Re: pg_dump: VACUUM and REINDEXING - Mailing list pgsql-general

From Guillaume Lelarge
Subject Re: pg_dump: VACUUM and REINDEXING
Date
Msg-id CAECtzeXtrwxGgiWNb_qsTG-tm8fyTsgLdfguWNhjni+1_H8qDg@mail.gmail.com
Whole thread Raw
In response to Re: pg_dump: VACUUM and REINDEXING  (Ron <ronljohnsonjr@gmail.com>)
Responses Re: pg_dump: VACUUM and REINDEXING
Re: pg_dump: VACUUM and REINDEXING
List pgsql-general
Le sam. 7 mai 2022 à 10:21, Ron <ronljohnsonjr@gmail.com> a écrit :
On 5/6/22 21:35, Hasan Marzooq wrote:
Hello!

I've some questions around Backup & Restore.

1: Is it necessary to perform a VACUUM and REINDEXING operation after restoring the dump from Postgres 9.6 to Postgres 13? The dump size could be 1/2 TB to 1 TB.

Perform VACUUM after there have been many updates and deletes.  There have been zero updates and deleted after pg_restore; therefore, no need to vacuum.


I disagree. You're right about the "zero updates and deletes", so no need to vacuum for bloat. But you need vacuum to get the visibility map of each relation, so that the planner can use index-only scans.


--
Guillaume.

pgsql-general by date:

Previous
From: Ron
Date:
Subject: Re: pg_dump: VACUUM and REINDEXING
Next
From: Durumdara
Date:
Subject: PLPGSQL - extra column existence in trigger