Re: Temporary tables prevent autovacuum, leading to XID wraparound

Alvaro Herrera <alvherre@2ndquadrant.com>

From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>, tsunakawa.takay@jp.fujitsu.com, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, pgsql-hackers@postgresql.org
Date: 2018-08-08T14:40:02Z
Lists: pgsql-hackers
On 2018-Aug-08, Michael Paquier wrote:

> As this introduces a new
> field to PGPROC, so back-patching the thing as-is would cause an ABI
> breakage.  Are folks here fine with the new field added to the bottom of
> the structure for the backpatched versions, including v11?  I have found
> about commit 13752743 which has also added a new field called
> isBackgroundWorker in the middle of PGPROC in a released branch, which
> looks to me like an ABI breakage...

Unnoticed ABI breaks make my hair stand on end. 

I suppose if we didn't know about 13752743 earlier, then not much
outside code relies on PGPROC, or at least its members after
isBackgroundWorker.  I wouldn't move it now (I suppose anyone who cared
has already adjusted for it), but please do put your new member at the
end in backbranches.

I'm unsure about pg11 -- is it a backbranch already or not?  Since we've
released beta3 already, ISTM we should consider it so.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


Commits

  1. Clarify comment about assignment and reset of temp namespace ID in MyProc

  2. Make autovacuum more aggressive to remove orphaned temp tables

  3. Don't count background workers against a user's connection limit.