Re: REINDEX vs VACUUM - Mailing list pgsql-general

From Hao Zhang
Subject Re: REINDEX vs VACUUM
Date
Msg-id CAGXpB2m-OW46r7+mi2LR7BuBc5FApFyuydCxrT=UNvWahxjfsQ@mail.gmail.com
Whole thread Raw
In response to REINDEX vs VACUUM  (Hao Zhang <kennthhz@gmail.com>)
List pgsql-general
+ pgsql-admin
Would appreciate any insights. Thanks

On Sat, Dec 31, 2022 at 1:04 PM Hao Zhang <kennthhz@gmail.com> wrote:
What is the difference between reindex and vacuum's impact on index file? I deleted an indexed row. Running either vacuum or reindex shows the index entry for the row is removed from the index page. I was under the impression that only reindex will remove dangling index entries. I am guessing that vacuum will not shrink the index file and will only add deleted index entries in the free space file for the index? But REINDEX is recreating the index file from scratch so it is like vacuum full for index?

Thanks

pgsql-general by date:

Previous
From: "Zwettler Markus (OIZ)"
Date:
Subject: postgres restore & needed history files
Next
From: Rébeli-Szabó Tamás
Date:
Subject: Re: REINDEX vs VACUUM