Re: removal of dangling temp tables
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2018-12-14T17:57:23Z
Lists: pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes: > On Fri, Dec 14, 2018 at 11:29 AM Alvaro Herrera > <alvherre@2ndquadrant.com> wrote: >> I think the best way to fix this is to call RemoveTempRelations() >> unconditionally at session start (without doing the rest of the temp >> table setup, just the removal.) > That would certainly simplify things. I think I thought about that as > far back as a734fd5d1c309cc553b7c8c79fba96218af090f7 but it seemed > like a significant behavior change and I wasn't sure that everyone > would like it. In particular, it adds overhead to backend startup > that, in the case of a large temp schema, could be fairly long. > Nevertheless, I tentatively think that a change like this is a good > idea. I wouldn't back-patch it, though. I seem to recall discussions about having crash recovery go around and clean out temp tables. That seems like a better plan than penalizing every session start with this. regards, tom lane
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