logical replication slot and publication alter

Поиск
Список
Период
Сортировка
От Jinhua Luo
Тема logical replication slot and publication alter
Дата
Msg-id CAAc9rOzcgE_1ZFtcU1p=zFRVmkaGcYZ-gLhknCpC+qrC975=1g@mail.gmail.com
обсуждение исходный текст
Список pgsql-hackers
Hi All,

There is an interesting issue: I created one replication slot,
specifying pgouput plugin and one publication "foobar". The
publication "foobar" was set to tables "foo1, foo2".

The slot was left unread, while the tables foo1 and foo2 get changed.
Then, I alter the publication "foobar" to remove table "foo2" and
start logical replication.

The changes from foo2 still be sent from the slot!

Another try is even if I drop the publication "foobar", the slot still
find the original publication definition and send the changes without
problem.

I check the source codes, and I think it's due to the snapshot, when
pgoutput load the publication, it would use the catalog tuples from
the snapshot instead of current version, so even if the publication
get altered or get dropped, the original version is still there in the
snapshot.

Is it expected or it's a bug? Anyways, alter publication would not
affect the replication stream is unexpected.

Regards,
Jinhua Luo



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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: Psql patch to show access methods info
Следующее
От: Etsuro Fujita
Дата:
Сообщение: Re: [HACKERS] advanced partition matching algorithm forpartition-wise join