Re: pg_stat_activity xact_start and autovacuum

Поиск
Список
Период
Сортировка
От Decibel!
Тема Re: pg_stat_activity xact_start and autovacuum
Дата
Msg-id 96B09899-C642-4845-8433-D3C231806C0B@decibel.org
обсуждение исходный текст
Ответ на Re: pg_stat_activity xact_start and autovacuum  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-general
On Feb 11, 2008, at 8:14 AM, Alvaro Herrera wrote:
> Actually it's not just autovacuum; it's any lazy vacuum.  It's hard to
> tell those processes apart in pg_stat_activity.  Perhaps we could have
> added a column in pg_stat_activity indicating processes that don't
> hold
> old tuples, but I feel that would have been a little too much.


I don't think it'd be too hard to construct a regex that would catch
all vacuums, after which you could throw out FULLs. I'm thinking
something like

\s*vacuum((\s+full){0,1}\s+\S+){0,1};{0,1}

Where \s indicates whitespace and \S indicates not whitespace (sorry,
don't have a regex manual handy...)

You could probably even simplify that to

\s*vacuum(\s+full){0}

Of course, you'd want to perform all of those in a case-insensitive
manner.
--
Decibel!, aka Jim C. Nasby, Database Architect  decibel@decibel.org
Give your computer some brain candy! www.distributed.net Team #1828



Вложения

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

Предыдущее
От: Decibel!
Дата:
Сообщение: Re: Conditional ordering operators
Следующее
От: Decibel!
Дата:
Сообщение: Re: end of life for pg versions...