Brian Hirt <[EMAIL PROTECTED]> 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) ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend