"David G. Johnston" <david.g.johnston@xxxxxxxxx> writes: > On Mon, Aug 8, 2016 at 10:43 AM, Natalie Wenz <nataliewenz@xxxxxxxxxxx> > wrote: >> 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 FWIW, this is due to get better in 9.6. Per release notes: Avoid re-vacuuming pages containing only frozen tuples (Masahiko Sawada, Robert Haas, Andres Freund) Formerly, an anti-wraparound vacuum had to visit every page of a table whether or not there was anything to do there. Now, pages containing only already-frozen tuples are identified in the table's visibility map, and can be skipped by vacuum even when it's doing transaction wraparound prevention. This should greatly reduce the cost of maintaining large tables containing mostly-unchanging data. regards, tom lane -- Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin