Re: Pg_repack - Mailing list pgsql-admin

From Rui DeSousa
Subject Re: Pg_repack
Date
Msg-id 2A5A54F1-9954-40B5-8E87-5F8BA6C8D6C6@icloud.com
Whole thread Raw
In response to Re: Pg_repack  (Ron Johnson <ronljohnsonjr@gmail.com>)
List pgsql-admin


On Aug 12, 2024, at 12:06 PM, Ron Johnson <ronljohnsonjr@gmail.com> wrote:

But pg_repack is just a better VACUUM FULL, and VACUUM FULL has to be better than autovacuum because it fully vacuums a table.


No.

Vacuum — actually vacuums by removing dead tuples that are no longer needed, freezing tuples, etc. The removal of dead tuples frees space on the given page and it also truncates the fully empty pages that are located at the end of the file if it can.

Vacuum FULL — is something completely different.  It rebuilds the entire table thus it coalesces all free space and by proxy does the same as vacuum (removing dead tuples that are no longer needed).
— It does this by creating a new table and then swapping in the new table when; regardless of the number of dead tuples.

Vacuum FULL should not be run on a regular basis.


pgsql-admin by date:

Previous
From: Ron Johnson
Date:
Subject: Re: Pg_repack
Next
From: Rui DeSousa
Date:
Subject: Re: Pg_repack