Re: Assertion failure in GetSubscriptionRelations() with concurrent DROP TABLE

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
Cc: vignesh C <vignesh21(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Assertion failure in GetSubscriptionRelations() with concurrent DROP TABLE
Date: 2026-08-25 13:41:27
Message-ID: CAA4eK1LxqAUycU0KLzXPu8ePBoxNcMCgGMvP2Dsj2bmLcp4ECg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Aug 25, 2026 at 5:39 PM Hayato Kuroda (Fujitsu)
<kuroda(dot)hayato(at)fujitsu(dot)com> wrote:
>
> Thanks for updating the patch. I confirmed it could fix the issue.
>
>
> ```
> + else
> + elog(ERROR, "unexpected relkind: %d", (int) relkind);
> ```
>
>
> I feel \"%c\" might be better than %d, like what ProcessUtilitySlow() does,
> because the relkind is defined as char.
>

Agreed, though %d is used for the same purpose at one place in code
but other uses %c for relkind. How about a slightly more informative
message like: elog(ERROR, "unexpected relkind \"%c\" for relation %u
in subscription %u", relkind, subrel->srrelid, subid)?

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message cca5507 2026-08-25 13:43:35 Re: Walreceiver create temp slot more than once when timeline switch
Previous Message Tom Lane 2026-08-25 13:20:52 Re: Replace px_memset() with explicit_bzero()