Re: segfault of autovacuum process during restore - coredumps included - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: segfault of autovacuum process during restore - coredumps included
Date
Msg-id 20051128172405.GD18576@surnet.cl
Whole thread Raw
In response to Re: segfault of autovacuum process during restore - coredumps included  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Tom Lane wrote:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
> > The attached patch should correct the problem, but I'd like to make sure
> > it does ...
>
> Rather than that, I'd suggest just setting ActiveSnapshot
> unconditionally after each of the StartTransactionCommand calls in
> autovacuum.c, ie make the code look just like vacuum.c:
>
>     /* Begin a transaction for vacuuming this relation */
>     StartTransactionCommand();
>     /* functions in indexes may want a snapshot set */
>     ActiveSnapshot = CopySnapshot(GetTransactionSnapshot());

Done.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Bug on CHARACTER(n) ?
Next
From: "Jim C. Nasby"
Date:
Subject: Re: Hi