| From: | Frank van Vugt <ftm(dot)van(dot)vugt(at)foxi(dot)nl> | 
|---|---|
| To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
| Cc: | pgsql-bugs(at)postgresql(dot)org | 
| Subject: | Re: segfault of autovacuum process during restore - coredumps included | 
| Date: | 2005-11-28 15:12:53 | 
| Message-ID: | 200511281612.54360.ftm.van.vugt@foxi.nl | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-bugs | 
> Alvaro Herrera <alvherre(at)commandprompt(dot)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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2005-11-28 15:20:57 | Re: segfault of autovacuum process during restore - coredumps included | 
| Previous Message | Tom Lane | 2005-11-28 14:55:57 | Re: segfault of autovacuum process during restore - coredumps included |