Re: pg_dump: VACUUM and REINDEXING

2022-05-09 Thread Tom Lane
Laurenz Albe writes: > But from PostgreSQL v13 on, autovacuum is also triggered by INSERTs. > So I'd say that there is nothing to do after restoring a pg_dump, except > to wait until autovacuum is done. You might want to do manual VACUUM ANALYZE (no need for FULL) if you don't want to wait around

Re: pg_dump: VACUUM and REINDEXING

2022-05-08 Thread Laurenz Albe
On Sat, 2022-05-07 at 12:06 +0200, Guillaume Lelarge wrote: > Le sam. 7 mai 2022 à 10:21, Ron a écrit : > >  On 5/6/22 21:35, Hasan Marzooq wrote: > > > I've some questions around Backup & Restore. > > > > > >  1: Is it necessary to perform a VACUUM and REINDEXING operation after > > > restoring

Re: pg_dump: VACUUM and REINDEXING

2022-05-07 Thread Guillaume Lelarge
Le sam. 7 mai 2022 à 15:27, Hasan Marzooq a écrit : > Hello! > > Thanks Guillaume and Ron! > > I understand REINDEXING is not required, and as Guillaume highlighted, > vacuum will still be needed after pg_restore. > > Is it ok to perform a "standard" vacuum or do we need a "FULL" > vacuum after p

Re: pg_dump: VACUUM and REINDEXING

2022-05-07 Thread Hasan Marzooq
Hello! Thanks Guillaume and Ron! I understand REINDEXING is not required, and as Guillaume highlighted, vacuum will still be needed after pg_restore. Is it ok to perform a "standard" vacuum or do we need a "FULL" vacuum after pg_restore? Also, I think finding tables which have dead rows and the

Re: pg_dump: VACUUM and REINDEXING

2022-05-07 Thread Guillaume Lelarge
Le sam. 7 mai 2022 à 10:21, Ron 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

Re: pg_dump: VACUUM and REINDEXING

2022-05-07 Thread Ron
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 ma

Re: pg_dump: VACUUM and REINDEXING

2022-05-07 Thread Guillaume Lelarge
Hi, Le sam. 7 mai 2022 à 04:36, Hasan Marzooq a écrit : > 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. > > You can