Re: Fix bug with accessing to temporary tables of other sessions
Soumya S Murali <soumyamurali.work@gmail.com>
From: Soumya S Murali <soumyamurali.work@gmail.com>
To: Jim Jones <jim.jones@uni-muenster.de>
Cc: Daniil Davydov <3danissimo@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Stepan Neretin <slpmcf@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2026-04-16T06:41:53Z
Lists: pgsql-hackers
Hi all, Thank you for the guidance and the updated patch. On Mon, Apr 13, 2026 at 7:26 PM Jim Jones <jim.jones@uni-muenster.de> wrote: > > Hi > > On 13/04/2026 14:40, Soumya S Murali wrote: > > Please let me know if there are additional scenarios I should > > validate. Looking forward to more feedback. > > Thanks for testing it. You can take a look at > 012_temp_obj_multisession.pl and check if we missed any path. > > Due to changes introduced in b2a17ba7a5d the patch was no longer > applying. See rebased v18 attached. > I tested the rebased v18 patch on a clean tree and verified that it applies cleanly and behaves consistently with previous results. Cross-session access is correctly blocked with: ERROR: cannot access temporary relations of other sessions Index scan paths are also properly restricted, and same-session access continues to work as expected. The updated test changes look good. Everything works as expected, +1 from my side. Regards, Soumya
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Prevent access to other sessions' temp tables
- 4dfae59a1d31 17 (unreleased) landed
- 1b0dd08157bf 18 (unreleased) landed
- ce146621f786 19 (unreleased) landed
-
Add tests for cross-session temp table access
- 40927d458fe1 17 (unreleased) landed
- 1cd37a7a8dc6 18 (unreleased) landed
- 1fee0e857e33 19 (unreleased) landed
-
Doc: use "an SQL" consistently rather than "a SQL"
- b51f86e49a7f 18.0 cited
-
Modify the relcache to record the temp status of both local and nonlocal
- 948d6ec90fd3 8.4.0 cited