Re: Fix bug with accessing to temporary tables of other sessions - Mailing list pgsql-hackers

From Jim Jones
Subject Re: Fix bug with accessing to temporary tables of other sessions
Date
Msg-id 9be9ee9b-b816-4ff9-a929-d830e21b94fc@uni-muenster.de
Whole thread
In response to Re: Fix bug with accessing to temporary tables of other sessions  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Fix bug with accessing to temporary tables of other sessions
List pgsql-hackers
Hi David

On 25/04/2026 00:30, David G. Johnston wrote:
> If you can run the tests against v17 (that is the behavior we are trying
> to restore here, correct?) and v18 that would help demonstrate why the
> backpatch is needed.

Tests for PG18 and PG17:

== PG 18 ==

psql (18.3 (Debian 18.3-1.pgdg13+1))
Type "help" for help.

postgres=# \d pg_temp*.*
                    Table "pg_temp_36.t"
     Column      |  Type   | Collation | Nullable | Default
-----------------+---------+-----------+----------+---------
 generate_series | integer |           |          |

postgres=# SELECT * FROM pg_temp_36.t;
 generate_series
-----------------
(0 rows)


== PG 17 ==

psql (17.7 (Debian 17.7-3.pgdg13+1))
Geben Sie »help« für Hilfe ein.

postgres=# \d pg_temp*.*
                         Tabelle »pg_temp_13.t«
     Spalte      |   Typ   | Sortierfolge | NULL erlaubt? | Vorgabewert
-----------------+---------+--------------+---------------+-------------
 generate_series | integer |              |               |

postgres=# SELECT * FROM pg_temp_13.t;
 generate_series
-----------------
(0 Zeilen)


Until PG16 an error message was raised:

psql (16.13 (Debian 16.13-1.pgdg13+1))
Type "help" for help.

postgres=# \d pg_temp*.*
                    Table "pg_temp_3.t"
     Column      |  Type   | Collation | Nullable | Default
-----------------+---------+-----------+----------+---------
 generate_series | integer |           |          |

postgres=# SELECT * FROM pg_temp_3.t;
ERROR:  cannot access temporary tables of other sessions


Best, Jim




pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Add a guard against uninitialized default locale
Next
From: Robert Haas
Date:
Subject: Re: Proposal: DROP ROLE ... REASSIGN OWNED TO ...