| From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
|---|---|
| To: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
| Cc: | vignesh C <vignesh21(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 04:52:12 |
| Message-ID: | CAA4eK1+tVHCBzxnjwqyD1YsebT5FBPbYqcmc83cu=SQQVrVvbA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Mon, Aug 24, 2026 at 11:35 PM Bharath Rupireddy
<bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote:
>
> If it's not easily reproducible with direct SQL, I don't think we need
> to fix this at all, because none of the other places (for example,
> getOwnedSequences_internal() or GetPubPartitionOptionRelations())
> handle a null relkind either.
>
But they will work (as they are if checks) and as far as I can see
they will do the right thing which means they will tolerate concurrent
drops but if not I feel it is better to fix those as well.
> Even if we were to fix, I would just
> remove the assertion and continue in the loop if the relation is not
> what we expect. Would that work?
>
As we are scanning pg_susbcription_rel unexpected relkind here (not
'\0', something else entirely) would probably indicate a real bug
worth surfacing, not silently swallowing. So, I suggest we can remove
assert after Vignesh's fix and have an elog(ERROR, "unexpected
relkind: %d", (int) relkind);. We use such an elog at other places as
well.
--
With Regards,
Amit Kapila.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bharath Rupireddy | 2026-08-25 05:33:00 | Re: Assertion failure in GetSubscriptionRelations() with concurrent DROP TABLE |
| Previous Message | Ajin Cherian | 2026-08-25 04:51:58 | Re: Per-table resync for logical replication subscriptions |