Re: Fix assert failure when decoding XLOG_PARAMETER_CHANGE on primary
Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
From: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
To: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2025-02-07T08:05:41Z
Lists: pgsql-hackers
Hi,
On Wed, Feb 05, 2025 at 10:59:22AM -0800, Masahiko Sawada wrote:
> On Tue, Feb 4, 2025 at 11:48 PM Bertrand Drouvot
> <bertranddrouvot.pg@gmail.com> wrote:
> > + if (SlotIsLogical(s) && !EnableHotStandby)
> > + ereport(FATAL,
> > + (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
> > + errmsg("hot standby must be enabled for pre-existing logical replication slots")));
> >
> > On a primary lowering wal_level < logical, we'd get something like:
> >
> > "
> > FATAL: logical replication slot "logical_slot" exists, but "wal_level" < "logical"
> > "
> >
> > What about being close to it, so something like?
> >
> > "
> > FATAL: logical replication slot "logical_slot" exists, but "hot_standby" = "off"
> > "
>
> Looks good, but I'd like to mention that this is required only on
> standbys. So how about the following?
>
> FATAL: logical replication slot "s" exists on the standby, but
> "hot_standby" = "off"
> HINT: Change "hot_standby" to be "on".
Thanks! Looks good and consistent with the existing wording that can be found
in slot.c.
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
Commits
-
Fix assertion when decoding XLOG_PARAMETER_CHANGE on promoted primary.
- cc628f66187c 16.9 landed
- 174952ece1c0 17.5 landed
- 48796a98d5ae 18.0 landed