Re: replicating DROP commands across servers

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: replicating DROP commands across servers
Дата
Msg-id 20140613195049.GQ18688@eldon.alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: replicating DROP commands across servers  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: replicating DROP commands across servers
Re: replicating DROP commands across servers
Список pgsql-hackers
Here's a patch implementing the proposed idea.  This is used in the
Bidirectional Replication stuff by Simon/Andres; it works well.


One thing of note is that I added output flags for "normal" and
"original", which mostly come from performDeletion flags.  This let one
select only such objects when trying to replicate a drop; otherwise,
we'd add RI triggers to the set to drop remotely, which doesn't work
because their names have OIDs embedded, and in the remote system those
are different.

One curious thing is that I had to add a hack that if an object has a
"reverse" flag in the ObjectAddresses array, also set the "normal"
output flag.  (Another possibility would have been to add a "reverse"
output flag, but there doesn't seem to be a use for that --- it seems to
expose internals unnecessarily.)

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: ALTER TABLESPACE MOVE command tag tweak
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Add CREATE support to event triggers