Re: Fix bug with accessing to temporary tables of other sessions

David G. Johnston <david.g.johnston@gmail.com>

From: "David G. Johnston" <david.g.johnston@gmail.com>
To: Jim Jones <jim.jones@uni-muenster.de>
Cc: Michael Paquier <michael@paquier.xyz>, Alexander Korotkov <aekorotkov@gmail.com>, Soumya S Murali <soumyamurali.work@gmail.com>, Daniil Davydov <3danissimo@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Stepan Neretin <slpmcf@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>, Mohamed Ali <moali.pg@gmail.com>, Nazneen Jafri <jafrinazneen@gmail.com>, Shawn McCoy <shawn.the.mccoy@gmail.com>
Date: 2026-04-24T22:30:51Z
Lists: pgsql-hackers
On Fri, Apr 24, 2026 at 3:09 PM Jim Jones <jim.jones@uni-muenster.de> wrote:

>
> 0001 - TAP tests with improved coverage and comments that pass on
> current master, documenting the existing behaviour, which means broken
> commands silently succeed (e.g. SELECT returns 0 rows, no error)


> 0002 - read_stream.c and bufmgr.c fix + updated test expectations (the
> same commands now raise errors)
>

If you can run the tests against v17 (that is the behavior we are trying to
restore here, correct?) and v18 that would help demonstrate why the
backpatch is needed.

David J.

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Prevent access to other sessions' temp tables

  2. Add tests for cross-session temp table access

  3. Doc: use "an SQL" consistently rather than "a SQL"

  4. Modify the relcache to record the temp status of both local and nonlocal