Re: pg_upgrade —link does it remove table bloat

From: Michael Lewis <mlewis(at)entrata(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: Jason Ralph <jralph(at)affinitysolutions(dot)com>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_upgrade —link does it remove table bloat
Date: 2020-02-13 18:02:13
Message-ID: CAHOFxGrWFNwC5B+K7iofDb_49r+JKcXwGZoWyEcQkO66kRSc9w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jason Ralph 2020-02-13 18:04:30 RE: pg_upgrade —link does it remove table bloat
Previous Message Adrian Klaver 2020-02-13 15:45:57 Re: pg_upgrade —link does it remove table bloat