Re: row filtering for logical replication
От | Amit Kapila |
---|---|
Тема | Re: row filtering for logical replication |
Дата | |
Msg-id | CAA4eK1KmHUPcHXjU7BLKCb-QBUcdoFWTGr8QRahNePHgh5qtzg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: row filtering for logical replication (Alvaro Herrera <alvherre@alvh.no-ip.org>) |
Список | pgsql-hackers |
On Wed, Apr 13, 2022 at 10:01 PM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote: > > BTW I just noticed that AlterPublicationOptions acquires only > ShareAccessLock on the publication object. I think this is too lax ... > what if two of them run concurrently? (say to specify different > published actions) Do they overwrite the other's update? > No, they won't overwrite. Firstly the AccessShareLock on the publication object is not related to concurrent change of the publication object. They will be protected by normal update-row rules (like till the first transaction finishes, the other will wait). See an example below: Session-1 postgres=# Begin; BEGIN postgres=*# Alter publication pub1 set (publish = 'insert'); ALTER PUBLICATION Session-2: postgres=# Begin; BEGIN postgres=*# Alter publication pub1 set (publish = 'update'); The Alter in Session-2 will wait till we end the transaction in Session-1. -- With Regards, Amit Kapila.
В списке pgsql-hackers по дате отправления: