From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Fix assert failure when decoding XLOG_PARAMETER_CHANGE on primary |
Date: | 2025-02-05 06:38:26 |
Message-ID: | CAA4eK1J6CtvsEV-fLPDa3P5yyRUX=RAnF--E+gYXc6VaC-KkbQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Feb 5, 2025 at 2:06 AM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>
> I've attached the updated patch. The fix needs to be back-patched to
> v16 where logical decoding on standby was introduced.
>
Isn't it better to give the new ERROR near the below code?
RestoreSlotFromDisk()
{
...
if (cp.slotdata.database != InvalidOid && wal_level < WAL_LEVEL_LOGICAL)
ereport(FATAL,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
errmsg("logical replication slot \"%s\" exists, but \"wal_level\" <
\"logical\"",
NameStr(cp.slotdata.name)),
...
}
If feasible, this will avoid an additional loop over the slots and a
new ERROR will be added at the same place as an existing similar
ERROR.
--
With Regards,
Amit Kapila.
From | Date | Subject | |
---|---|---|---|
Next Message | vignesh C | 2025-02-05 06:42:40 | Re: Restrict publishing of partitioned table with a foreign table as partition |
Previous Message | Masahiro Ikeda | 2025-02-05 06:31:04 | Recheck if ANALYZE is needed after VACUUM finishes by autovacuum |