Re: autovacuum process (PID ...) was terminated by signal 11 - Mailing list pgsql-bugs

From Tom Lane
Subject Re: autovacuum process (PID ...) was terminated by signal 11
Date
Msg-id 4428.1136400469@sss.pgh.pa.us
Whole thread Raw
In response to Re: autovacuum process (PID ...) was terminated by signal 11  (Brian Hirt <bhirt@mobygames.com>)
Responses Re: autovacuum process (PID ...) was terminated by signal 11
List pgsql-bugs
Brian Hirt <bhirt@mobygames.com> writes:
> I was just writing to let you know I created an easily reproducible
> test case too, but I guess you don't need that now.

Does your test case agree with my description of the problem?
(If you're not sure, crank up log_min_messages and watch the log
to see what autovacuum does before it crashes.)

The problem I'm seeing seems to be that vacuum() exits with a
transaction started but no snapshot set (StartTransactionCommand will
leave ActiveSnapshot set to NULL), if it's in use_own_xacts mode.
autovac thinks it only has to set the snapshot once, but that's really
not the case given this behavior.

I'm unsure whether to fix this by adding a CopySnapshot operation right
in vacuum(), or in autovacuum.c.  The former is probably cleaner but it
clutters vacuum.c with something only autovac really needs.  Any
opinions?

> Also, if a patch is produced, I'd love to get a copy of it. We just
> upgraded our production servers to 8.1.1 this morning (this issue
> never came up during testing) and I'l like to get this in there
> because it's likely to happen again.

Definitely a big risk of that :-(.  It'll be a one-liner patch in any
case, we just have to decide where ...

            regards, tom lane

pgsql-bugs by date:

Previous
From: Robert Osowiecki
Date:
Subject: Re: BUG #2143: Indexes incorrectly created from database dump
Next
From: Robert Osowiecki
Date:
Subject: Re: BUG #2143: Indexes incorrectly created from database dump