Re: BUG with accessing to temporary tables of other sessions still exists
Alexander Korotkov <aekorotkov@gmail.com>
From: Alexander Korotkov <aekorotkov@gmail.com>
To: ZizhuanLiu X-MAN <44973863@qq.com>
Cc: Daniil Davydov <3danissimo@gmail.com>,
Jim Jones <jim.jones@uni-muenster.de>, pgsql-hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-06-30T20:24:47Z
Lists: pgsql-hackers
Attachments
- v4-0001-Prevent-access-to-other-sessions-empty-temp-table.patch (application/octet-stream) patch v4-0001
Hi! On Sun, Jun 21, 2026 at 3:36 PM ZizhuanLiu X-MAN <44973863@qq.com> wrote: > Indeed, compared with migrating all the checks into `localbuf.c`, this adjustment involves far fewer code changes. > > Thanks for updating the patch to v3. I've reviewed the changes, and everything looks correct > and consistent with the existing buffer manager architecture. > > This placement of the RELATION_IS_OTHER_TEMP check in bufmgr.c perfectly follows > the existing code pattern, so I have no further comments. Thank you for your review. Thanks to Daniil for the patch. I made some minor grammar corrections. I'm going to push and backpatch this to 16 if no objections. Backpatch to 16, because it's a first release after 31966b151e6, which introduced a separate local relation extension function ExtendBufferedRelLocal() lacking of RELATION_IS_OTHER_TEMP() check. ------ Regards, Alexander Korotkov Supabase
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