Re: replicating DDL statements

Поиск
Список
Период
Сортировка
От Gregory Wood
Тема Re: replicating DDL statements
Дата
Msg-id 04c501c2e40d$d09f16f0$4f89ffcc@eng3
обсуждение исходный текст
Ответ на replicating DDL statements  ("Ed L." <pgsql@bluepolka.net>)
Ответы Re: replicating DDL statements  ("Ed L." <pgsql@bluepolka.net>)
Список pgsql-general
> I considered setting up triggers on Pgsql system tables to replicate DDL
> statements and replicate those system row changes much like user data, and
> to also use system table triggers to create replication triggers for newly
> added tables.  But user triggers are not allowed on system tables, and I'm
> not sure it'd be reasonable or wise anyway.  Comments or other ideas?

One potential problem you might run into is triggers on said added tables.

I had to disable my user-made triggers on slave databases because those
triggers would add rows to secondary audit tables, which were also covered
by replication. In other words, I would have had duplicate entries in my
audit tables... one for the master being replicated, one for the slave as
the trigger executed.

Additionally, I have functions that set timestamps to reflect the last
updated time of a row. If I kept the triggers on the mirrored database, the
timestamps will differ from the slave to the master (and possibly even the
other slaves).

I imagine things could get hairy pretty fast.

Greg


В списке pgsql-general по дате отправления:

Предыдущее
От: Garo Hussenjian
Дата:
Сообщение: Re: Postgres and gdb: p debug_query_string RE: Query
Следующее
От: Patrick Macdonald
Дата:
Сообщение: Re: 7.4?