Re: autovacuum process (PID ...) was terminated by signal 11

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Brian Hirt <bhirt(at)mobygames(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Subject: Re: autovacuum process (PID ...) was terminated by signal 11
Date: 2006-01-04 19:18:03
Message-ID: 6339.1136402283@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Brian Hirt <bhirt(at)mobygames(dot)com> writes:
> Also, if a patch is produced, I'd love to get a copy of it.

I concluded that patching vacuum.c was much the cleanest way to do it.
Here's the patch against 8.1 branch.

regards, tom lane

Index: src/backend/commands/vacuum.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/commands/vacuum.c,v
retrieving revision 1.317.2.1
diff -c -r1.317.2.1 vacuum.c
*** src/backend/commands/vacuum.c 22 Nov 2005 18:23:08 -0000 1.317.2.1
--- src/backend/commands/vacuum.c 4 Jan 2006 19:10:35 -0000
***************
*** 510,515 ****
--- 510,523 ----
* PostgresMain().
*/
StartTransactionCommand();
+ /*
+ * Re-establish the transaction snapshot. This is wasted effort
+ * when we are called as a normal utility command, because the
+ * new transaction will be dropped immediately by PostgresMain();
+ * but it's necessary if we are called from autovacuum because
+ * autovacuum might continue on to do an ANALYZE-only call.
+ */
+ ActiveSnapshot = CopySnapshot(GetTransactionSnapshot());
}

if (vacstmt->vacuum)

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Brian Hirt 2006-01-04 20:39:43 Re: autovacuum process (PID ...) was terminated by signal 11
Previous Message Tom Lane 2006-01-04 19:14:44 Re: BUG #2143: Indexes incorrectly created from database dump