Re: VACUUM FULL, CLUSTER, and REPACK block on other sessions' temp tables
Zsolt Parragi <zsolt.parragi@percona.com>
From: Zsolt Parragi <zsolt.parragi@percona.com>
To: Jim Jones <jim.jones@uni-muenster.de>
Cc: Chao Li <li.evan.chao@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Antonin Houska <ah@cybertec.at>
Date: 2026-03-25T20:38:25Z
Lists: pgsql-hackers
Hello!
Shouldn't the patch also include a tap test to verify that the change
works / fails without it?
+ /* Skip temp relations belonging to other sessions */
+ {
+ Oid nsp = get_rel_namespace(index->indrelid);
+
+ if (!isTempOrTempToastNamespace(nsp) && isAnyTempNamespace(nsp))
+ {
Doesn't this result in several repeated syscache lookups?
There's already a SearchSysCacheExsists1 directly above this, then a
get_rel_namespace, then an isAnyTempNamespace. While this probably
isn't performance critical, this should be doable with a single
SearchSysCache1(RELOID...) and then a few conditions, similarly to the
else branch below this?
Commits
-
Skip other sessions' temp tables in REPACK, CLUSTER, and VACUUM FULL
- a0a0c0c20ec5 19 (unreleased) landed