Re: Allow single table VACUUM in transaction block

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Allow single table VACUUM in transaction block
Дата
Msg-id CAH2-Wznw1=feDia3CfNASZ_rC7QEBcb2NTCDWh8pZ+d5ikyVSA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Allow single table VACUUM in transaction block  (Simon Riggs <simon.riggs@enterprisedb.com>)
Список pgsql-hackers
On Mon, Nov 7, 2022 at 12:20 AM Simon Riggs
<simon.riggs@enterprisedb.com> wrote:
> > Another related idea: better behavior in the event of a manually
> > issued VACUUM (now just an enqueued autovacuum) that cannot do useful
> > work due to the presence of a long running snapshot. The VACUUM
> > doesn't have to dutifully report "success" when there is no practical
> > sense in which it was successful. There could be a back and forth
> > conversation between autovacuum.c and vacuumlazy.c that makes sure
> > that something useful happens sooner or later. The passage of time
> > really matters here.
>
> Regrettably, neither vacuum nor autovacuum waits for xmin to change;
> perhaps it should.

Yes, it's very primitive right now. In fact I recently discovered that
just using the reloption version (not the GUC version) of
autovacuum_freeze_max_age in a totally straightforward way is all it
takes to utterly confuse autovacuum.c:

https://postgr.es/m/CAH2-Wz=DJAokY_GhKJchgpa8k9t_H_OVOvfPEn97jGNr9W=deg@mail.gmail.com

It's easy to convince autovacuum.c to launch antiwraparound
autovacuums that reliably have no chance of advancing relfrozenxid to
a degree that satisfies autovacuum.c. It will launch antiwraparound
autovacuums again and again, never realizing that VACUUM doesn't
really care about what it expects (at least not with the reloption in
use). Clearly that's just broken. It also suggests a more general
design problem, at least in my mind.

--
Peter Geoghegan



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: new option to allow pg_rewind to run without full_page_writes
Следующее
От: Jacob Champion
Дата:
Сообщение: Re: [PATCH] Add `verify-system` sslmode to use system CA pool for server cert