Re: [PATCH] Corruption Issue: Fix missing tts_tid in ExecForceStoreHeapTuple

From: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
To: "Burd, Greg" <greg(at)burd(dot)me>
Cc: Virender Singla <virender(dot)cse(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Andres Freund <andres(at)anarazel(dot)de>, Michael Paquier <michael(at)paquier(dot)xyz>
Subject: Re: [PATCH] Corruption Issue: Fix missing tts_tid in ExecForceStoreHeapTuple
Date: 2026-09-14 12:31:09
Message-ID: CAFiTN-uu6DE12=htWTERqS8CDjpPyMd5ZKARc20ZyLRdykOAPg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 14, 2026 at 5:47 PM Burd, Greg <greg(at)burd(dot)me> wrote:
>
>
>
> > On Sep 14, 2026, at 8:10 AM, Virender Singla <virender(dot)cse(at)gmail(dot)com> wrote:
> >
> > Just a quick ping on this patch.
> > It appears the `tts_tid` assignment was inadvertently omitted from the
> > BufferHeapTupleTableSlot path in ExecForceStoreHeapTuple() when the
> > function was first introduced during the PG12 TupleTableSlot
> > refactoring [1].
>
> I ran into this myself and posted a patch [1] as well. I had not noticed your
> patch. Looks like both patches are essentially identical with different tests
> we could combine those into one and then possibly get the attention of a
> committer.
>
> > This was subsequently exposed when the GiST index scan reorder queue
> > was updated to route popped tuples through this same function [2]. The
> > relevant code hasn't changed since those commits.
> >
> > Thanks,
> > Virender
> > [1] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=4da597edf1b
> > [2] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=b8b94ea129f
>
> I agree, it's a bug/oversight that has lingered since v12 and should be fixed.

+1 this seems like and issue, we can compare this with
ExecStoreHeapTuple() which restore back the ctid so I think here it
seems like and oversight and attached patch seems to be doing right
thing.

--
Regards,
Dilip Kumar
Google

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Geier 2026-09-14 12:31:23 Re: Reduce build times of pg_trgm GIN indexes
Previous Message Álvaro Herrera 2026-09-14 12:24:22 Re: Redundant headers in pg_stat_statements