Re: BUG with accessing to temporary tables of other sessions still exists

From: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
To: ZizhuanLiu X-MAN <44973863(at)qq(dot)com>
Cc: Daniil Davydov <3danissimo(at)gmail(dot)com>, Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG with accessing to temporary tables of other sessions still exists
Date: 2026-06-30 20:24:47
Message-ID: CAPpHfdthPzXJdc4yCz7qS6BiP3ZQTmD4nijWvvkVfoTwqPVuzw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi!

On Sun, Jun 21, 2026 at 3:36 PM ZizhuanLiu X-MAN <44973863(at)qq(dot)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

Attachment Content-Type Size
v4-0001-Prevent-access-to-other-sessions-empty-temp-table.patch application/octet-stream 4.9 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jelte Fennema-Nio 2026-06-30 20:27:51 Re: Correct documentation for protocol version
Previous Message Dean Rasheed 2026-06-30 20:21:27 Re: Global temporary tables