[COMMITTERS] pgsql: Avoid useless respawining the autovacuum launcher at highspeed.

Поиск
Список
Период
Сортировка
От Robert Haas
Тема [COMMITTERS] pgsql: Avoid useless respawining the autovacuum launcher at highspeed.
Дата
Msg-id E1cUgj4-0003Gh-Fb@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Avoid useless respawining the autovacuum launcher at high speed.

When (1) autovacuum = off and (2) there's at least one database with
an XID age greater than autovacuum_freeze_max_age and (3) all tables
in that database that need vacuuming are already being processed by a
worker and (4) the autovacuum launcher is started, a kind of infinite
loop occurs.  The launcher starts a worker and immediately exits.  The
worker, finding no worker to do, immediately starts the launcher,
supposedly so that the next database can be processed.  But because
datfrozenxid for that database hasn't been advanced yet, the new
worker gets put right back into the same database as the old one,
where it once again starts the launcher and exits.  High-speed ping
pong ensues.

There are several possible ways to break the cycle; this seems like
the safest one.

Amit Khandekar (code) and Robert Haas (comments), reviewed by
Álvaro Herrera.

Discussion: http://postgr.es/m/CAJ3gD9eWejf72HKquKSzax0r+epS=nAbQKNnykkMA0E8c+rMDg@mail.gmail.com

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/5c5788e901e2bc3ec242d0a22de8b7d8a5ddb69b

Modified Files
--------------
src/backend/postmaster/autovacuum.c | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: [COMMITTERS] pgsql: Fix comparison logic in partition_bounds_equal for non-finitebo
Следующее
От: Peter Eisentraut
Дата:
Сообщение: [COMMITTERS] pgsql: Move some things from builtins.h to new header files