From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Natalie Wenz <nataliewenz(at)ebureau(dot)com> |
Cc: | pgsql-admin <pgsql-admin(at)postgresql(dot)org>, Kevin Grittner <kgrittn(at)gmail(dot)com> |
Subject: | Re: Database 'template1' vacuum |
Date: | 2016-08-08 15:00:03 |
Message-ID: | CAKFQuwZK7jtxLDGam0uWvC3L2XpY=r3TMTMUSg_KxGd+d1yLqQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On Mon, Aug 8, 2016 at 10:43 AM, Natalie Wenz <nataliewenz(at)ebureau(dot)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:
https://wiki.postgresql.org/wiki/VacuumHeadaches
https://www.postgresql.org/docs/current/static/routine-vacuuming.html#VACUUM-FOR-VISIBILITY-MAP
"""
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.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-08-08 16:45:10 | Re: Database 'template1' vacuum |
Previous Message | Natalie Wenz | 2016-08-08 14:43:24 | Re: Database 'template1' vacuum |