Jeff Gold <[EMAIL PROTECTED]> 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

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

Reply via email to