]> granicus.if.org Git - postgresql/commitdiff
The second patch adds a more explicative error message to BufferPoolCheckLeak.
authorMarc G. Fournier <scrappy@hub.org>
Thu, 23 Jan 1997 19:43:23 +0000 (19:43 +0000)
committerMarc G. Fournier <scrappy@hub.org>
Thu, 23 Jan 1997 19:43:23 +0000 (19:43 +0000)
It should be completely harmless.

Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>

src/backend/storage/buffer/bufmgr.c

index edb88596927167ec54c19415dad705c49587f12b..b40b0b0e0451f727ac2f25c9ec9570920f82f6ac 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.9 1997/01/20 04:36:48 vadim Exp $
+ *    $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.10 1997/01/23 19:43:23 scrappy Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1105,15 +1105,20 @@ int
 BufferPoolCheckLeak()
 {
     register int i;
+    int error = 0;
     void PrintBufferDescs();
     
     for (i = 1; i <= NBuffers; i++) {
        if (BufferIsValid(i)) {
-           elog(NOTICE, "buffer leak detected in BufferPoolCheckLeak()");
-           PrintBufferDescs();
-           return(1);
+           elog(NOTICE, 
+                 "buffer leak [%d] detected in BufferPoolCheckLeak()", i-1);
+            error = 1;
        }
     }
+    if(error) {
+      PrintBufferDescs();
+      return(1);
+    }
     return(0);
 }