Re: Fix apply worker crash when subscriber table has only a deferrable primary key

From: Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>
To: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix apply worker crash when subscriber table has only a deferrable primary key
Date: 2026-09-29 11:35:29
Message-ID: CABdArM7eVtS5wF696UgBEgjkDih-vTgqJxE9G4R=G95pJc9G4w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 29, 2026 at 3:20 PM Hayato Kuroda (Fujitsu)
<kuroda(dot)hayato(at)fujitsu(dot)com> wrote:
>
> > Thanks for the patch, I've combined your suggested fix and attched
> > updated patch v2.
>
> I checked and no comments for the implementation.
> Regarding the back patch, the initial issue (FindReplTupleInLocalRel() can cause
> a crash) should be done till PG17, but second one (RelationFindDeletedTupleInfoSeq()
> can do a wrong decision) should be done only for PG19/master, right?

Makes sense; I overlooked the fact.

> If so the patch should be separated. Also, a test can be added in 035_conflicts for the
> second issue.
>

I’ve attached the separate patches; both apply independently on HEAD
and their respective backport branches.

I’ve also added a test case in 035_conflicts.pl, for the
RelationFindDeletedTupleInfoSeq() fix.

--
Thanks,
Nisha

Attachment Content-Type Size
v3-0001-Don-t-match-deleted-rows-on-a-deferrable-PK-in-up.patch application/octet-stream 5.2 KB
v3-0001-Don-t-treat-a-deferrable-PK-as-replica-identity-o.patch application/octet-stream 5.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bernhard Wonisch 2026-09-29 11:38:42 ATTACH PARTITION cost grows linearly with pg_constraint size (seqscan in CloneFkReferenced), much worse since not-null constraints are in pg_constraint (PG 18)
Previous Message Zsolt Parragi 2026-09-29 11:24:46 Re: injection_points: canceled or terminated waiters leak their wait slots