Re: VACUUM FULL, CLUSTER, and REPACK block on other sessions' temp tables - Mailing list pgsql-hackers

From Zsolt Parragi
Subject Re: VACUUM FULL, CLUSTER, and REPACK block on other sessions' temp tables
Date
Msg-id CAN4CZFPgxc4_BMjkss=UATpxUF-koPRxOeXL819gn3PD=vy8Ng@mail.gmail.com
Whole thread
In response to Re: VACUUM FULL, CLUSTER, and REPACK block on other sessions' temp tables  (Jim Jones <jim.jones@uni-muenster.de>)
Responses Re: VACUUM FULL, CLUSTER, and REPACK block on other sessions' temp tables
List 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?



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Proposal: Adding compression of temporary files
Next
From: David Rowley
Date:
Subject: Re: SQL-level pg_datum_image_equal