RE: Temporary tables prevent autovacuum, leading to XID wraparound - Mailing list pgsql-hackers

From Tsunakawa, Takayuki
Subject RE: Temporary tables prevent autovacuum, leading to XID wraparound
Date
Msg-id 0A3221C70F24FB45833433255569204D1F8B14C4@G01JPEXMBYT05
Whole thread Raw
In response to Re: Temporary tables prevent autovacuum, leading to XID wraparound  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: Temporary tables prevent autovacuum, leading to XID wraparound
List pgsql-hackers
From: Michael Paquier [mailto:michael.paquier@gmail.com]
> I am not sure that we would like to give up that easily the property that
> we have now to clean up past temporary files only at postmaster startup
> and only when not in recovery.  If you implement that, there is a risk that
> the backend you are starting is eating the connection slot and by consequence
> its temporary schema and its set of temporary tables on which one may want
> to look into after a crash.

postmaster deletes temporary relation files at startup by calling RemovePgTempFiles() regardless of whether it's in
recovery. It doesn't call that function during auto restart after a crash when restart_after_crash is on.
 


> > 2. Teach autovacuum to remove any leftover tables in a pg_temp_%d
> > schema if the backend is active but in some other database (rather
> > than only when the backend is not active at all).
> 
> Yeah.  Here we can do something.  This does not sound much difficult to
> me.

I did that in my patch.

Regards
Takayuki Tsunakawa




pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Temporary tables prevent autovacuum, leading to XID wraparound
Next
From: Michael Paquier
Date:
Subject: Re: Temporary tables prevent autovacuum, leading to XID wraparound