Re: BUG #19519: REPACK can fail due to missing chunk for toast value - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: BUG #19519: REPACK can fail due to missing chunk for toast value
Date
Msg-id ak7UE1KPZnAGfhW1@paquier.xyz
Whole thread
In response to Re: BUG #19519: REPACK can fail due to missing chunk for toast value  (Imran Zaheer <imran.zhir@gmail.com>)
List pgsql-bugs
On Wed, Jul 08, 2026 at 08:00:28PM +0500, Imran Zaheer wrote:
> The tuplesort_getheaptuple() will contain both live and recently
> deleted tuples. However, the proposed fix passes missing_ok=true for
> all tuples coming out of the sort, which means a toast fetch failure
> for a LIVE tuple would be acceptable and will be silently skipped. Or
> am I missing something?

Argh, thanks.  Using missing_ok=true for the sort path is broken.  The
flag should be false, instead.  When dealing with the sort of the
tuples, we would already have made sure that the tuples with missing
toast chunks have been discarded, so a plain error with a missing
chunk would point to an invalid case.

I'm taking some time today to rework the patch set.  Will add this
adjustment in it.
--
Michael

Attachment

pgsql-bugs by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: BUG #19536: UPDATE RETURNING OLD value is stale after concurrent update when table has a BEFORE UPDATE trigger
Next
From: Michael Paquier
Date:
Subject: Re: BUG #19519: REPACK can fail due to missing chunk for toast value