Re: Autovacuum vs statement_timeout

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Autovacuum vs statement_timeout
Date: 2007-03-30 17:20:19
Message-ID: 20070330172019.GF19682@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> I wrote:
> > Heikki Linnakangas <heikki(at)enterprisedb(dot)com> writes:
> >> statement_timeout interrupts seem to go through the PG_CATCH-block and
> >> clean up the entry from the vacuum cycle array as they should. But a
> >> SIGINT leading to a "terminating connection due to administrator
> >> command" error does not.
>
> > Hm, that's an interesting thought, but there are no "terminating
> > connection" messages in Shuttleworth's logs either. So we still lack
> > the right idea there. (BTW it would be SIGTERM not SIGINT.)
>
> Hold it ... stop the presses ... the reason we saw no "terminating
> connection" messages was he was grepping his logs for lines containing
> ERROR. Once we look for FATAL too, there are a pile of 'em. I'm not
> 100% convinced that any are from autovacuum processes, but clearly
> *something* is throwing SIGTERM around with abandon in his test
> environment. So at this point your theory above looks like a plausible
> mechanism for the vacuum cycle array to slowly fill up and eventually
> make _bt_start_vacuum fail (or, perhaps, fail sooner than that due to
> a repeat vacuum attempt).

Hmmm, remember that DatabaseCancelAutovacuumActivity is called on CREATE
DATABASE; but what it does is send SIGINT, not SIGTERM. Also, it's not
in 8.2. SIGINT does terminate the autovac process however.

I haven't read the whole problem report completely, so I'm not sure this
has something to do or not.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavan Deolasee 2007-03-30 17:21:25 Re: CREATE INDEX and HOT - revised design
Previous Message Florian G. Pflug 2007-03-30 17:15:19 Re: CREATE INDEX and HOT - revised design