Re: Postmaster Out of Memory

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Postmaster Out of Memory
Дата
Msg-id 27857.1119718625@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Postmaster Out of Memory  (Jeff Gold <jgold@mazunetworks.com>)
Ответы Re: Postmaster Out of Memory
Список pgsql-general
Jeff Gold <jgold@mazunetworks.com> writes:
> [ backend memory leak ]

Found it --- the actual leak is in index_create, not in TRUNCATE or
CLUSTER at all; and it's been there a really long time.
Patch for 7.4 branch attached.

            regards, tom lane

Index: index.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/catalog/index.c,v
retrieving revision 1.219
diff -c -r1.219 index.c
*** index.c    29 Sep 2003 00:05:24 -0000    1.219
--- index.c    25 Jun 2005 16:22:43 -0000
***************
*** 707,719 ****
      }

      /*
!      * Fill in the index strategy structure with information from the
!      * catalogs.  First we must advance the command counter so that we
!      * will see the newly-entered index catalog tuples.
       */
      CommandCounterIncrement();

!     RelationInitIndexAccessInfo(indexRelation);

      /*
       * If this is bootstrap (initdb) time, then we don't actually fill in
--- 707,727 ----
      }

      /*
!      * Advance the command counter so that we can see the newly-entered
!      * catalog tuples for the index.
       */
      CommandCounterIncrement();

!     /*
!      * In bootstrap mode, we have to fill in the index strategy structure
!      * with information from the catalogs.  If we aren't bootstrapping,
!      * then the relcache entry has already been rebuilt thanks to sinval
!      * update during CommandCounterIncrement.
!      */
!     if (IsBootstrapProcessingMode())
!         RelationInitIndexAccessInfo(indexRelation);
!     else
!         Assert(indexRelation->rd_indexcxt != NULL);

      /*
       * If this is bootstrap (initdb) time, then we don't actually fill in

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

Предыдущее
От: Frank van Vugt
Дата:
Сообщение: Re: PL/pgSQL function to validate UPC and EAN barcodes
Следующее
От: David Lazar
Дата:
Сообщение: plpgsql function changes?