Re: The vacuum-ignore-vacuum patch

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: The vacuum-ignore-vacuum patch
Дата
Msg-id 12532.1153764048@sss.pgh.pa.us
обсуждение исходный текст
Ответ на The vacuum-ignore-vacuum patch  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Ответы Re: The vacuum-ignore-vacuum patch  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: The vacuum-ignore-vacuum patch  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-patches
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> Hannu Krossing asked me about his patch to ignore transactions running
> VACUUM LAZY in other vacuum transactions.  I attach a version of the
> patch updated to the current sources.

nonInVacuumXmin seems useless ... perhaps a vestige of some earlier
version of the computation?

In general, it seems to me that a transaction running lazy vacuum could
be ignored for every purpose except truncating clog/subtrans.  Since it
will never insert its own XID into the database (note: VACUUM ANALYZE is
run as two separate transactions, hence the pg_statistic rows inserted
by ANALYZE are not a counterexample), there's no need for anyone to
include it as running in their snapshots.  So unless I'm missing
something, this is a safe change for lazy vacuum, but perhaps not for
full vacuum, which *does* put its XID into the database.

A possible objection to this is that it would foreclose running VACUUM
and ANALYZE as a single transaction, exactly because of the point that
we couldn't insert pg_statistic rows using a lazy vacuum's XID.  I think
there was some discussion of doing that in connection with enlarging
ANALYZE's sample greatly --- if ANALYZE goes back to being a full scan
or nearly so, it'd sure be nice to combine it with the VACUUM scan.
However maybe we should just accept that as the price of not having
multiple vacuums interfere with each other.

            regards, tom lane

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Allow commenting of variables in postgresql.conf to - try 4
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: The vacuum-ignore-vacuum patch