Re: Proposal: Conflict log history table for Logical Replication
От | Dilip Kumar |
---|---|
Тема | Re: Proposal: Conflict log history table for Logical Replication |
Дата | |
Msg-id | CAFiTN-u06Uk_yRFa1r3+ECphzwB1k+zoV0s7vHFDSiNRaKER_g@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Proposal: Conflict log history table for Logical Replication (Amit Kapila <amit.kapila16@gmail.com>) |
Ответы |
Re: Proposal: Conflict log history table for Logical Replication
|
Список | pgsql-hackers |
On Sat, Sep 27, 2025 at 8:53 PM Amit Kapila <amit.kapila16@gmail.com> wrote: > > I am not able to understand what exact problem you are seeing here. I > was thinking that during the CREATE SUBSCRIPTION command, a new table > with user provided name will be created similar to how we create a > slot. The difference would be that we create a slot on the > remote/publisher node but this table will be created locally. > That's not an issue, the problem here we are discussing is the conflict history table which is created on the subscriber node should not be published when this node subscription node create another publisher with ALL TABLE option. So we found a option for inserting into this table with HEAP_INSERT_NO_LOGICAL flag so that those insert will not be decoded, but what about another not subscribing from this publisher, they should have this table because when ALL TABLES are published subscriber node expect all user table to present there even if its changes are not published. Consider below example Node1: CREATE PUBLICATION pub_node1.. Node2: CREATE SUBSCRIPTION sub.. PUBLICATION pub_node1 WITH(conflict_history_table='my_conflict_table'); CREATE PUBLICATION pub_node2 FOR ALL TABLE; Node3: CREATE SUBSCRIPTION sub1.. PUBLICATION pub_node2; --this will expect 'my_conflict_table' to exist here because when it will call pg_get_publication_tables() from Node2 it will also get the 'my_conflict_table' along with other user tables. And as a solution I wanted to avoid this table to be avoided when pg_get_publication_tables() is being called. Option1: We can see if table name is listed as conflict history table in any of the subscribers on Node2 we will ignore this. Option2: Provide a new table option to mark table as non publishable table when ALL TABLE option is provided, I think this option can be useful independently as well. -- Regards, Dilip Kumar Google
В списке pgsql-hackers по дате отправления: