Re: POC: enable logical decoding when wal_level = 'replica' without a server restart
От | Masahiko Sawada |
---|---|
Тема | Re: POC: enable logical decoding when wal_level = 'replica' without a server restart |
Дата | |
Msg-id | CAD21AoCfiYu-w2GeuVsWbwuS8ez7kfCy5P6ds8fsTubSdg5MzQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: POC: enable logical decoding when wal_level = 'replica' without a server restart (Shlok Kyal <shlok.kyal.oss@gmail.com>) |
Ответы |
Re: POC: enable logical decoding when wal_level = 'replica' without a server restart
|
Список | pgsql-hackers |
On Fri, Aug 29, 2025 at 2:46 AM Shlok Kyal <shlok.kyal.oss@gmail.com> wrote: > > Hi Sawada-san, > > Thanks for the updated patch. > > I have a doubt. When we create publication (when wal_level is set to > replica) we get a warning: > WARNING: logical decoding needs to be enabled to publish logical changes > HINT: Before creating subscriptions, set "wal_level" >= "logical" or > create a logical replication slot when "wal_level" = "replica". > > The hint suggests that when wal_level = 'replica', before creating a > subscription, we should create logical slots on the publisher. But > when I tested this scenario, I created a subscription (without having > a prior logical slot on the publisher). The operation was successful, > the effective_wal_level was set appropriately and logical replication > was working fine. I think this happens because the CREATE SUBSCRIPTION > command itself creates a logical slot on the publisher. > > Should we update the HINT message here? Thank you for the comment! I believe the point is whether to hint that creating a subscription is a third way to enable logical decoding. I'm concerned that it could be redundant as CREATE SUBSCRIPTION with create_slot=true actually creates the logical slot as you mentioned, and we already mentioned it. If we add it to the hink, we would have to mention it as well when we have commands in the future that internally creates a logical slot. I think that it's prudent to mention the minimum requirement to enable logical decoding in the hint. Regards, -- Masahiko Sawada Amazon Web Services: https://aws.amazon.com
В списке pgsql-hackers по дате отправления: