Re: removal of dangling temp tables
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2018-12-15T03:42:03Z
Lists: pgsql-hackers
On Fri, Dec 14, 2018 at 11:06:32PM -0300, Alvaro Herrera wrote: > I did propose in my OP the idea of a PGPROC boolean flag that indicates > whether the temp namespace has been set up. If not, have autovac remove > those tables. I like this option better, but I fear it adds more > ProcArrayLock contention. Maybe I can just use a new LWLock to > coordinate that particular member of the ProcGlobal array ... (but then > it can no longer be a boolean.) Isn't that what tempNamespaceId can be used for in PGPROC now? The flag would be set only when a backend creates a new temporary schema so as it can be tracked as the owner of the schema. -- Michael
Commits
-
Have DISCARD ALL/TEMP remove leftover temp tables
- b7258a30aa6f 9.5.16 landed
- aa2e84d2cc8d 9.6.12 landed
- 3c4ca21093b5 10.7 landed
- 2602838fa338 9.4.21 landed
-
Make autovacuum more selective about temp tables to keep
- 5199abaca318 9.4.21 landed
- a85045cccb1b 9.5.16 landed
- a6ca47cd2f3f 10.7 landed
- 7fc2363a6158 9.6.12 landed
-
Make autovacuum more aggressive to remove orphaned temp tables
- 943576bddcb5 11.0 cited
-
autovacuum: Drop orphan temp tables more quickly but with more caution.
- a734fd5d1c30 10.0 cited