AutoVacuum starvation from sinval messages

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема AutoVacuum starvation from sinval messages
Дата
Msg-id CAMkU=1w2nsTsqu7nurg+CGPMHmfWpxs837SrK1w4yopm47WSOw@mail.gmail.com
обсуждение исходный текст
Ответы Re: AutoVacuum starvation from sinval messages  (Jeff Janes <jeff.janes@gmail.com>)
Re: AutoVacuum starvation from sinval messages  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: AutoVacuum starvation from sinval messages  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
While doing a rather contrived test of something else, using:
perl -le 'print "create table foo (x serial); drop table foo;"
foreach (1..1e6)'|psql

I noticed starvation of autovacuum launcher process and bloating of catalogs.

Basically the WaitLatch in autovacuum.c line 602 (in head) never returns.

This was introduced by a180776f7a1c4554f214b, "Teach unix_latch.c to
use poll() where available"

When the poll() gets EINTR by SIGUSR1 for the invalidation, it
restarts at the full timeout (60 seconds in this case) with no
accounting for the time already waited.

It does not seem outrageous to me that there would be real-world
conditions in which invalidations would be sent more than once a
minute over prolonged periods, so this total starvation seems like a
bug.

Should gettimeofday be called before and after the poll() and then the
difference deducted from timeout?

Cheers,

Jeff



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

Предыдущее
От: Dean Rasheed
Дата:
Сообщение: Re: Proof of concept: auto updatable views [Review of Patch]
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Proof of concept: auto updatable views [Review of Patch]