Re: BUG #13002: VACUUM to prevent wraparound blocks TRUNCATE - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: BUG #13002: VACUUM to prevent wraparound blocks TRUNCATE
Date
Msg-id 20150408194547.GW4369@alvh.no-ip.org
Whole thread Raw
In response to Re: BUG #13002: VACUUM to prevent wraparound blocks TRUNCATE  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-bugs
David G. Johnston wrote:

> ​Related question: does a truncated table effectively reset its wraparound
> counter back to zero?

Yes, the relfrozenxid is set to RecentXmin (see ExecuteTruncate).  Not
quite zero age but unless you have really old transactions around,
should be close enough.

> If the table in question is being truncated regularly it doesn't seem like
> this situation should arise.

Correct.

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

pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: BUG #13002: VACUUM to prevent wraparound blocks TRUNCATE
Next
From: Jeff Janes
Date:
Subject: Re: BUG #13002: VACUUM to prevent wraparound blocks TRUNCATE