Subject: VACUUM on temp table blocks VACUUM on another...

From: Jim Vanns <[email-masked]>
Date: Thu, 1 Aug 2024 16:54:49 +0100

I have two sessions, each creating a temporary table of the same name -
'foobar'. Why would a vacuum of 'foobar' from one session block the vacuum
of 'foobar' in the other session? They're in separate tablespaces
(pg_temp_NN) and effectively distinct with respect to the sessions.

Cheers,

Jim

-- 
Jim Vanns
Principal Production Engineer
Industrial Light & Magic, London

---

From: Tom Lane <[email-masked]>
Date: Thu, 01 Aug 2024 15:12:41 -0400

Jim Vanns <[email-masked]> writes:
> of 'foobar' in the other session?

That's fairly hard to believe.  Can you provide a self-contained test
case?

			regards, tom lane

---

From: Jim Vanns <[email-masked]>
Date: Thu, 1 Aug 2024 21:00:54 +0100

I don't at hand, but the query I used to identify this was;

SELECT state, pid, pg_blocking_pids(pid), query
FROM pg_stat_activity
WHERE backend_type='client backend';