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 0A3221C70F24FB45833433255569204D1F8AABEC@G01JPEXMBYT05
Whole thread Raw
In response to Re: Temporary tables prevent autovacuum, leading to XID wraparound  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Temporary tables prevent autovacuum, leading to XID wraparound
List pgsql-hackers
From: Robert Haas [mailto:robertmhaas@gmail.com]
> Unfortunately, I think a full solution to the problem of allocating AV
> workers to avoid wraparound is quite complex.

Yes, that easily puts my small brain into an infinite loop...

> Given all of the foregoing this seems like a very hard problem.  I can't
> even articulate a clear set of rules for what our priorities should be,
> and it seems that such rules would depend on the rate at which we're consuming
> XIDs, how close we are in each database to a wraparound shutdown, what tables
> exist in each database, how big the not-all-frozen part of each one is,
> how big their indexes are, how much they're holding back relfrozenxid, and
> which ones already have workers, among other things.  I think it's quite
> possible that we can come up with something that's better than what we have
> now without embarking on a huge project, but it's not going to be anywhere
> near perfect because this is really complicated, and there's a real risk
> that we'll just making some cases better and others worse rather than
> actually coming out ahead overall.

So a simple improvement would be to assign workers fairly to databases facing a wraparound risk, as Sawada-san
suggested.

One ultimate solution should be the undo-based MVCC that makes vacuuming unnecessary, which you proposed about a year
ago...

Regards
Takayuki Tsunakawa



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: [HACKERS] MERGE SQL Statement for PG11
Next
From: Andreas Karlsson
Date:
Subject: Re: [HACKERS] GnuTLS support