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

Commitc0e9b31

Browse files
committed
Hmm, seems --disable-spinlocks has been broken for awhile and nobody
noticed. Fix SpinlockSemas() to report the correct count consideringthat PG 8.1 adds a spinlock to each shared-buffer header.
1 parent98359c3 commitc0e9b31

File tree

1 file changed

+5
-3
lines changed
  • src/backend/storage/lmgr

1 file changed

+5
-3
lines changed

‎src/backend/storage/lmgr/spin.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@
1616
*
1717
*
1818
* IDENTIFICATION
19-
* $PostgreSQL: pgsql/src/backend/storage/lmgr/spin.c,v 1.20 2006/07/14 14:52:23 momjian Exp $
19+
* $PostgreSQL: pgsql/src/backend/storage/lmgr/spin.c,v 1.21 2006/07/22 21:04:40 tgl Exp $
2020
*
2121
*-------------------------------------------------------------------------
2222
*/
2323
#include"postgres.h"
2424

25+
#include"miscadmin.h"
26+
#include"storage/lwlock.h"
2527
#include"storage/spin.h"
2628

2729

@@ -53,9 +55,9 @@ SpinlockSemas(void)
5355
* similar to the way shmem space estimation is handled.
5456
*
5557
* For now, though, we just need a few spinlocks (10 should be plenty)
56-
* plus one for each LWLock.
58+
* plus one for each LWLock and one for each buffer header.
5759
*/
58-
returnNumLWLocks()+10;
60+
returnNumLWLocks()+NBuffers+10;
5961
}
6062

6163
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp