Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcef01c3

Browse files
committed
Avoid infinite loop in InvalidateBuffer if we ourselves are holding
a pin on the victim buffer.
1 parentafb66ad commitcef01c3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎src/backend/storage/buffer/bufmgr.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.186 2005/03/04 20:21:06 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.187 2005/03/18 05:25:23 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -551,6 +551,9 @@ InvalidateBuffer(BufferDesc *buf)
551551
{
552552
UnlockBufHdr_NoHoldoff(buf);
553553
LWLockRelease(BufMappingLock);
554+
/* safety check: should definitely not be our *own* pin */
555+
if (PrivateRefCount[buf->buf_id]!=0)
556+
elog(ERROR,"buffer is pinned in InvalidateBuffer");
554557
WaitIO(buf);
555558
gotoretry;
556559
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp