Re: removal of dangling temp tables
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2018-12-14T18:46:03Z
Lists: pgsql-hackers
On Fri, Dec 14, 2018 at 6:35 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > Hm. It *could*, if we wanted it to run some transactions after > finishing recovery. It'd have to launch a separate process per database. That would be useful infrastructure for other things, too, like automatic catalog upgrades in minor releases, but I'm not volunteering to write that infrastructure right now. > Alternatively, maybe we could have backends flag whether they've > taken ownership of their temp schemas or not, and let autovacuum > flush old temp tables if not? Yes, that seems like a possibly promising approach. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
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