Re: pg_upgrade —link does it remove table bloat - Mailing list pgsql-general

From Michael Lewis
Subject Re: pg_upgrade —link does it remove table bloat
Date
Msg-id CAHOFxGrWFNwC5B+K7iofDb_49r+JKcXwGZoWyEcQkO66kRSc9w@mail.gmail.com
Whole thread Raw
In response to Re: pg_upgrade —link does it remove table bloat  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses RE: pg_upgrade —link does it remove table bloat  (Jason Ralph <jralph@affinitysolutions.com>)
List pgsql-general
There is more than one type of statistics though. Stats on the distribution of data is easily recreated with analyze table_name or analyzing the whole database. What about the stats on how many rows have been inserted or updated since the last (auto)vacuum and that will be used to trigger autovacuum? Are those set back to zero by an upgrade? I would assume usage counts like how many times an index scan has been done would be reset, but if the numbers in pg_stat_user_tables like n_tup_upd or n_tup_del are zero'd out during an upgrade, than it would seem like a manual vacuum would always be a good idea to ensure a table wasn't 99% of the way to needing one and then the stats got reset by upgrading.

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: pg_upgrade —link does it remove table bloat
Next
From: Jason Ralph
Date:
Subject: RE: pg_upgrade —link does it remove table bloat