Re: Global temporary tables - Mailing list pgsql-hackers

From Dean Rasheed
Subject Re: Global temporary tables
Date
Msg-id CAEZATCX+WMWxxT-He2r24Y96ZBbx1Z2b6zFDGm9gHjjYWviZ=Q@mail.gmail.com
Whole thread
In response to Re: Global temporary tables  (Japin Li <japinli@hotmail.com>)
List pgsql-hackers
On Wed, 1 Jul 2026 at 07:24, Japin Li <japinli@hotmail.com> wrote:
>
> While testing the v5 patch, I encountered a lock wait.
>
> 2026-07-01 14:18:43.603 CST [1486593] LOG:  process 1486593 still waiting for AccessExclusiveLock on relation 16384
ofdatabase 5 after 1000.106 ms
 
> 2026-07-01 14:18:43.603 CST [1486593] DETAIL:  Process holding the lock: 1486484. Wait queue: 1486593.
> 2026-07-01 14:18:43.603 CST [1486593] CONTEXT:  waiting for AccessExclusiveLock on relation 16384 of database 5
> 2026-07-01 14:18:43.603 CST [1486593] STATEMENT:  SELECT * FROM gtt_delete;
>
> To reproduce:
>
> Session 1:
>
> CREATE GLOBAL TEMPORARY TABLE gtt_delete (id int) ON COMMIT DELETE ROWS;
> BEGIN;
> INSERT INTO gtt_delete VALUES (1);
>
> Session 2:
>
> SELECT * FROM gtt_delete;   ---> blocked
>
> Is this expected?

Thanks for testing!

This is fixed in v6.

Regards,
Dean



pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: Global temporary tables
Next
From: Baji Shaik
Date:
Subject: Re: uuidv7 improperly accepts dates before 1970-01-01