Re: VACUUM FULL, CLUSTER, and REPACK block on other sessions' temp tables

From: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
To: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
Cc: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Antonin Houska <ah(at)cybertec(dot)at>
Subject: Re: VACUUM FULL, CLUSTER, and REPACK block on other sessions' temp tables
Date: 2026-03-25 20:38:25
Message-ID: CAN4CZFPgxc4_BMjkss=UATpxUF-koPRxOeXL819gn3PD=vy8Ng@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
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?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2026-03-25 20:40:08 Re: SQL-level pg_datum_image_equal
Previous Message Tomas Vondra 2026-03-25 20:23:54 Re: Proposal: Adding compression of temporary files