Re: segfault of autovacuum process during restore - coredumps included

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

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Frank van Vugt 2005-11-28 15:12:53 Re: segfault of autovacuum process during restore - coredumps included
Previous Message netmaniac@libero.it 2005-11-28 13:38:27 On-line backup