Re: can't stop autovacuum by HUP'ing the server

From: "Dave Cramer" <pg(at)fastcrypt(dot)com>
To: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: can't stop autovacuum by HUP'ing the server
Date: 2008-08-26 15:56:51
Message-ID: 491f66a50808260856n6eac6dcfua015790937c87856@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Aug 26, 2008 at 11:51 AM, Dave Cramer <pg(at)fastcrypt(dot)com> wrote:

>
>
> On Tue, Aug 26, 2008 at 11:41 AM, Alvaro Herrera <
> alvherre(at)commandprompt(dot)com> wrote:
>
>> Dave Cramer wrote:
>> > On Tue, Aug 26, 2008 at 10:56 AM, Alvaro Herrera <
>> alvherre(at)commandprompt(dot)com
>>
>> > > The only possible explanation for this behavior is that somebody is
>> > > signalling the postmaster due to Xid wraparound issues. This is keyed
>> > > on some GUC vars -- Perhaps you have autovacuum_freeze_max_age set to
>> an
>> > > insane value?
>> >
>> > Doesn't appear to be insane ?
>> >
>> > #autovacuum_freeze_max_age = 200000000 # maximum XID age before forced
>> > vacuum
>>
>> Not only sane, but also the default ;-)
>>
>> What's the max age(pg_database.datfrozenxid)?
>
>
> select datfrozenxid from pg_database ;
> datfrozenxid
> --------------
> 201850617
> 101850961
> 86039359
> 21522712
>
>>
>>
this code in autovacuum.c looks like it might be interesting

if (AutoVacuumShmem->av_signal[AutoVacForkFailed])
{
/*
* If the postmaster failed to start a new
worker, we sleep
* for a little while and resend the
signal. The new worker's
* state is still in memory, so this is
sufficient. After
* that, we restart the main loop.
*
* XXX should we put a limit to the number
of times we retry?
* I don't think it makes much sense,
because a future start
* of a worker will continue to fail in the
same way.
*/

AutoVacuumShmem->av_signal[AutoVacForkFailed] = false;
pg_usleep(100000L); /* 100ms */

SendPostmasterSignal(PMSIGNAL_START_AUTOVAC_WORKER);
continue;

Do these signals get cleaned up on a reload ?

Dave

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2008-08-26 16:05:57 Re: can't stop autovacuum by HUP'ing the server
Previous Message Dave Cramer 2008-08-26 15:51:37 Re: can't stop autovacuum by HUP'ing the server