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

From: Daniil Davydov <3danissimo(at)gmail(dot)com>
To: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: BUG with accessing to temporary tables of other sessions still exists
Date: 2026-06-03 15:51:34
Message-ID: CAJDiXgjhuk31S02LZDxoLYc9C6sjWPX_QbhDY8Mx7FRU_WHxOw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Wed, Jun 3, 2026 at 10:20 PM Jim Jones <jim(dot)jones(at)uni-muenster(dot)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

Attachment Content-Type Size
v2-0001-Prevent-access-to-other-sessions-empty-temp-table.patch text/x-patch 4.4 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2026-06-03 16:17:10 Does MSVC predefine __x86_64__ on 64-bit Intel?
Previous Message Mingwei Jia 2026-06-03 15:40:18 Re: [RFC PATCH v2 RESEND 04/10] umbra: add patch 3 metadata disk format and identity mapping bootstrap