Re: Database 'template1' vacuum - Mailing list pgsql-admin

From David G. Johnston
Subject Re: Database 'template1' vacuum
Date
Msg-id CAKFQuwZK7jtxLDGam0uWvC3L2XpY=r3TMTMUSg_KxGd+d1yLqQ@mail.gmail.com
Whole thread Raw
In response to Re: Database 'template1' vacuum  (Natalie Wenz <nataliewenz@ebureau.com>)
Responses Re: Database 'template1' vacuum  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
On Mon, Aug 8, 2016 at 10:43 AM, Natalie Wenz <nataliewenz@ebureau.com> wrote:
Ok, I have one more question (for now!) about vacuum behavior:

How are static tables handled? Once every row in a table is marked as frozen, and there are no further inserts, deletes, updates, etc to the table, does the vacuum have to do anything to that table when advancing the relfrozenxid? Is there a way that the vacuum can see "Oh, this whole table is frozen, my work here is done!" or does it still have to scan every page (or worse, every row)?


Seems so:



"""
VACUUM normally only scans pages that have been modified since the last vacuum, but relfrozenxid can only be advanced when the whole table is scanned. The whole table is scanned when relfrozenxid is more than vacuum_freeze_table_age transactions old, when VACUUM's FREEZE option is used, or when all pages happen to require vacuuming to remove dead row versions.
"""

David J.

pgsql-admin by date:

Previous
From: Natalie Wenz
Date:
Subject: Re: Database 'template1' vacuum
Next
From: Tom Lane
Date:
Subject: Re: Database 'template1' vacuum