|
16 | 16 | *
|
17 | 17 | *
|
18 | 18 | * 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 $ |
20 | 20 | *
|
21 | 21 | *-------------------------------------------------------------------------
|
22 | 22 | */
|
23 | 23 | #include"postgres.h"
|
24 | 24 |
|
| 25 | +#include"miscadmin.h" |
| 26 | +#include"storage/lwlock.h" |
25 | 27 | #include"storage/spin.h"
|
26 | 28 |
|
27 | 29 |
|
@@ -53,9 +55,9 @@ SpinlockSemas(void)
|
53 | 55 | * similar to the way shmem space estimation is handled.
|
54 | 56 | *
|
55 | 57 | * 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. |
57 | 59 | */
|
58 |
| -returnNumLWLocks()+10; |
| 60 | +returnNumLWLocks()+NBuffers+10; |
59 | 61 | }
|
60 | 62 |
|
61 | 63 | /*
|
|