On Thu, Oct 16, 2025 at 9:48 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote:
>
...
> > ditto above. Those >= seem to make it more complex than necessary.
> >
> > errmsg can be: "...requires \"effective_wal_level\" to be \"logical\"
> > on the ..."
> > errhint can be: "...set \"wal_level\" = \"logical\" or..."
>
> It seems we're already using >= in many places even before the patch:
>
> src/backend/access/transam/xlogfuncs.c:
> errmsg("pg_log_standby_snapshot() can only be used if \"wal_level\" >=
> \"replica\"")));
> src/backend/postmaster/postmaster.c:
> (errmsg("replication slot synchronization (\"sync_replication_slots\"
> = on) requires \"wal_level\" >= \"logical\"")));
> src/backend/replication/logical/decode.c:
> errmsg("logical decoding on standby requires
> \"wal_level\" >= \"logical\" on the primary")));
> src/backend/replication/logical/logical.c:
> errmsg("logical decoding requires \"wal_level\" >= \"logical\"")));
> src/backend/replication/logical/logical.c:
> errmsg("logical decoding on standby requires \"wal_level\"
> >= \"logical\" on the primary")));
> src/backend/replication/logical/slotsync.c:
> errmsg("replication slot synchronization requires \"wal_level\" >=
> \"logical\""));
>
> I agree that it makes the message more complex than necessary. I
> imagine that we used that style since we can avoid editing these
> messages when we introduce a higher level than 'logical', but I think
> it's likely to adjust the messages in that case anyway. So how about
> discussing this topic in another thread to simply improve the
> user-faced error messages? If we can agree on such changes, this patch
> can follow the new style.
>
OK, done. See [1]
======
[1] https://www.postgresql.org/message-id/CAHut+PtSdpz1PNuUmHmH6U3CJ6ZipkkAssAEf4qnOpi-9cuweQ@mail.gmail.com
Kind Regards,
Peter Smith.
Fujitsu Australia