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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: autovacuum process (PID ...) was terminated by signal 11
Дата
Msg-id 6339.1136402283@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: autovacuum process (PID ...) was terminated by signal 11  (Brian Hirt <bhirt@mobygames.com>)
Ответы Re: autovacuum process (PID ...) was terminated by signal 11  (Frank van Vugt <ftm.van.vugt@foxi.nl>)
Список pgsql-bugs
Brian Hirt <bhirt@mobygames.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)

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #2143: Indexes incorrectly created from database dump
Следующее
От: Brian Hirt
Дата:
Сообщение: Re: autovacuum process (PID ...) was terminated by signal 11