I have PL/PGSQL functions that require temporary tables for storing
intermediate query output.
I used to create a temporary table with a unique name in each function
call, but that led to "out of shared memory" errors and bloating of
system catalogs, because temp tables are only actually dropped a
I have procedures that create temporary tables every time. When those
procedures are called many times in a single transaction I get an "out
of shared memory error". This happens even if the temporary tables are
correctly dropped as shown in the example below. Does postgres retain
a lock to a dropp