Re: removal of dangling temp tables

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>, Tom Lane <tgl@sss.pgh.pa.us>, Robert Haas <robertmhaas@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2018-12-27T22:56:54Z
Lists: pgsql-hackers
On Thu, Dec 27, 2018 at 04:30:21PM -0300, Alvaro Herrera wrote:
> We allow structs to receive new members at the end of the struct, since
> this doesn't affect the offset of existing members; thus code already
> compiled with the previous struct definition does not break.  AFAICS
> there is no danger in backpatching that, moving that struct member at
> the end of the struct.

Sure.  Now this comes to PGPROC, which I am not sure we can say is
never manipulated as an array.
--
Michael

Commits

  1. Have DISCARD ALL/TEMP remove leftover temp tables

  2. Make autovacuum more selective about temp tables to keep

  3. Make autovacuum more aggressive to remove orphaned temp tables

  4. autovacuum: Drop orphan temp tables more quickly but with more caution.