Re: We broke the defense against accessing other sessions' temp tables - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: We broke the defense against accessing other sessions' temp tables
Date
Msg-id aNA4bk3IAZCoHi4r@momjian.us
Whole thread Raw
In response to We broke the defense against accessing other sessions' temp tables  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: We broke the defense against accessing other sessions' temp tables
List pgsql-hackers
On Sun, Sep 21, 2025 at 01:32:59PM -0400, Tom Lane wrote:
> but that's gone missing :-(.  Apparently, we refactored things enough
> that ReadBufferExtended is not used for a simple seqscan, and since
> that's where the check for an other-session temp table is, we get
> no error and instead bogus results.  I did not bother to bisect to
> find a culprit commit, but given that the failure manifests in 17,
> I'm betting the stream I/O stuff is at fault.
> 
> I experimented with moving the check into PinBufferForBlock, and
> that seems to work correctly, but I wonder if someone who's messed
> with this code more recently than I would prefer a different
> solution.

Given that this problem exists in PG 17, I assume this will not affect
the PG 18 release this week.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Do not let urgent matters crowd out time for investment in the future.



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Add notification on BEGIN ATOMIC SQL functions using temp relations
Next
From: Tom Lane
Date:
Subject: Re: We broke the defense against accessing other sessions' temp tables