提交 37a8bdba 编写于 作者: M Marc G. Fournier

The second patch adds a more explicative error message to BufferPoolCheckLeak.

It should be completely harmless.

Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
上级 5184bd7c
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册