Re: Why doesn't GiST VACUUM require a super-exclusive lock, like nbtree VACUUM?

From: Michail Nikolaev <michail(dot)nikolaev(at)gmail(dot)com>
To: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>
Cc: Peter Geoghegan <pg(at)bowt(dot)ie>, pgsql-hackers(at)lists(dot)postgresql(dot)org, hlinnaka(at)iki(dot)fi, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, Tomas Vondra <tomas(at)vondra(dot)me>
Subject: Re: Why doesn't GiST VACUUM require a super-exclusive lock, like nbtree VACUUM?
Date: 2025-01-09 21:00:03
Message-ID: CANtu0ojcU0TVZwMYNvJ85615KqVoLaJVDouWaJL54FofxHDUdw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello.

One thing I think we could add to the patches is to adapt the 10-years-old
comment below with notice about IOS:

/*
* We save the LSN of the page as we read it, so that we know whether it
* safe to apply LP_DEAD hints to the page later. This allows us to drop
* the pin for MVCC scans, which allows vacuum to avoid blocking.
*/
so->curPageLSN = BufferGetLSNAtomic(buffer);

Also, I think it is a good idea to add "Assert(!scan->xs_want_itup);"
to gistkillitems.

Best regards,
Mikhail.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ilia Evdokimov 2025-01-09 21:05:33 Re: Sample rate added to pg_stat_statements
Previous Message Andres Freund 2025-01-09 20:53:20 Re: AIO v2.0