Re: Missing CONCURRENT VACUUM (Was: Release notes for

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Re: Missing CONCURRENT VACUUM (Was: Release notes for
Дата
Msg-id 1124662470.4857.22.camel@fuji.krosing.net
обсуждение исходный текст
Ответ на Missing CONCURRENT VACUUM (Was: Release notes for 8.1)  (Hannu Krosing <hannu@skype.net>)
Ответы Re: Missing CONCURRENT VACUUM (Was: Release notes for  (Hannu Krosing <hannu@tm.ee>)
Список pgsql-hackers
On E, 2005-08-22 at 00:36 +0300, Hannu Krosing wrote:
> On K, 2005-08-17 at 14:48 -0400, Tom Lane wrote:
> > Hannu Krosing <hannu@skype.net> writes:
> > > Please check the actual patch and advise if anything is still missing.
> > 
> > While testing this I realized that it does not in fact work as
> > advertised.  It will only exclude long-running VACUUMs from other
> > VACUUMs' OldestXmin if *all* the transactions in the system are lazy
> > VACUUMs.  If there is even one regular transaction in the system,
> > that transaction will include the VACUUMs in its MyProc->xmin, and
> > thence GetOldestXmin will have to include them in its result.
> 
> Thanks for spotting it. I guess in my case it was performing more or
> less as expected due to my load fluctuating between 0 and 300 concurrent
> transaction each minute, so the vacuum hit the 0 point often enough to
> be useful. I am running it in a loop, with 15 sec sleep between each
> vacuum.
> 
> > AFAICS the only way to fix this would be to exclude inVacuum
> > transactions from GetSnapshotData's calculations as well. 
> 
> I fixed this in a more local way by adding an extra "xmin" to proc for
> transactions where inVacuum is false (proc->nonInVacuumXmin) which is
> calculated together with proc->xmin.

Somehow this still did not fix the issue of getting the xmin of long
vacuum through concurrent transactions.

My initial testing was wrong.

Probably you should ignore the whole thing until I figure out why this
does not work ...

-- 
Hannu Krosing <hannu@tm.ee>


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

Предыдущее
От: "Dave Page"
Дата:
Сообщение: Re: Sleep functions
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: Missing CONCURRENT VACUUM (Was: Release notes for