Re: BUG with accessing to temporary tables of other sessions still exists
Daniil Davydov <3danissimo@gmail.com>
From: Daniil Davydov <3danissimo@gmail.com>
To: Jim Jones <jim.jones@uni-muenster.de>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2026-06-03T15:51:34Z
Lists: pgsql-hackers
Attachments
- v2-0001-Prevent-access-to-other-sessions-empty-temp-table.patch (text/x-patch) patch v2-0001
Hi, On Wed, Jun 3, 2026 at 10:20 PM Jim Jones <jim.jones@uni-muenster.de> wrote: > > Session 1 here does not create a temporary table (most likely a copy & > paste error), but I could reproduce this error as you suggested: > Sorry, I wrote it manually and forgot to specify "TEMP". It is implied here, of course. > > At a first glance the check seems reasonable. One tiny wording nit: the > comment in ExtendBufferedRelLocal says "... covering any attempt to > extend local relation.", but to avoid any confusing with the meaning of > RELATION_IS_LOCAL I'd argue that "covering any attempt to extend a > temporary relation" would be slightly clearer. > Thanks for looking into this! I agree with your comment. Please, see v2 patch with fixed comment. -- Best regards, Daniil Davydov
Commits
-
Prevent access to other sessions' empty temp tables
- c40819ebf954 master landed
- 8021cdceb018 19 (unreleased) landed
- 3aaefe8924f4 18 (unreleased) landed
- 4e49f68b72de 17 (unreleased) landed
- cc3fe7e2a747 16 (unreleased) landed
-
Add tests for cross-session temp table access
- 40927d458fe1 17 (unreleased) cited
-
Prevent access to other sessions' temp tables
- ce146621f786 19 (unreleased) cited