Re: Pg_repack

From: Rui DeSousa <rui(dot)desousa(at)icloud(dot)com>
To: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
Cc: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Pg_repack
Date: 2024-08-12 17:55:47
Message-ID: 75C786C9-0A22-4B67-A881-21D564A99668@icloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> On Aug 12, 2024, at 12:06 PM, Ron Johnson <ronljohnsonjr(at)gmail(dot)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.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Wasim Devale 2024-08-12 19:09:50 pg_dump
Previous Message Rui DeSousa 2024-08-12 17:54:50 Re: Pg_repack