Re: We broke the defense against accessing other sessions' temp tables

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: We broke the defense against accessing other sessions' temp tables
Date: 2025-09-21 17:39:58
Message-ID: aNA4bk3IAZCoHi4r@momjian.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-09-21 17:44:11 Re: We broke the defense against accessing other sessions' temp tables
Previous Message Tom Lane 2025-09-21 17:34:15 Re: Add notification on BEGIN ATOMIC SQL functions using temp relations