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

From Frank van Vugt
Subject Re: segfault of autovacuum process during restore - coredumps included
Date
Msg-id 200511281612.54360.ftm.van.vugt@foxi.nl
Whole thread Raw
In response to Re: segfault of autovacuum process during restore - coredumps included  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: segfault of autovacuum process during restore - coredumps included
List pgsql-bugs
> 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());
>
> This seems more future-proof.  The patch as proposed is assuming a whole
> lot about where snapshots might or might not get used.

Will try the patch tonight.

Tom, is your patch meant for the exact same location? Also, don't we need a
'CommitTransactionCommand()' as well?





--
Best,




Frank.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: segfault of autovacuum process during restore - coredumps included
Next
From: Tom Lane
Date:
Subject: Re: segfault of autovacuum process during restore - coredumps included