Re: BUG #13002: VACUUM to prevent wraparound blocks TRUNCATE

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: maciek(at)heroku(dot)com, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #13002: VACUUM to prevent wraparound blocks TRUNCATE
Date: 2015-04-08 19:45:47
Message-ID: 20150408194547.GW4369@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Jeff Janes 2015-04-08 19:53:11 Re: BUG #13002: VACUUM to prevent wraparound blocks TRUNCATE
Previous Message David G. Johnston 2015-04-08 19:36:14 Re: BUG #13002: VACUUM to prevent wraparound blocks TRUNCATE