On Thu, Nov 27, 2025 at 3:51 AM shveta malik <[email protected]> wrote: > > On Thu, Nov 27, 2025 at 2:32 AM Masahiko Sawada <[email protected]> wrote: > > > > > > I've squashed all fixup patches and attached the updated patch. > > > > Thanks for test results and the patch. Please find a few comments: > > 1) > If primary has effective_wal_level as logical and standby has zero > slots; then during promotion of standby, if I try to create a slot, it > is restricted as intended, but it gives misleading message: > postgres=# SELECT pg_create_logical_replication_slot('slot', > 'pgoutput', false, false, false); > ERROR: logical decoding on standby requires "effective_wal_level" >= > "logical" on the primary > HINT: Set "wal_level" >= "logical" or create at least one logical > slot when "wal_level" = "replica". > > One possibility is we extend the message as follows: > "Logical decoding on standby requires either effective_wal_level >= > logical on the primary or that recovery has finished." and remove > errhint?
But the proposed message seems to contradict with its condition: if (RecoveryInProgress() && !IsLogicalDecodingEnabled()) That is, logical decoding on standby is not necessarily enabled after recovery has finished (e.g., when it doesn't have a valid logical slot). If you get the error message while the standby is being promoted, isn't it a normal behavior given that the standby has not been fully promoted yet? I've addressed other points in the next version patch. Regards, -- Masahiko Sawada Amazon Web Services: https://aws.amazon.com
