diff options
author | Robert Haas <rhaas@postgresql.org> | 2014-10-02 13:58:50 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2014-10-02 13:58:50 -0400 |
commit | 3acc10c997f916f6a741d0b4876126b7b08e3892 (patch) | |
tree | aa4a30df253f7c219c52b3d41327301ad21d8285 /src/backend | |
parent | 952872698d9443fdf9b808a1376017f00c91065a (diff) | |
download | postgresql-3acc10c997f916f6a741d0b4876126b7b08e3892.tar.gz postgresql-3acc10c997f916f6a741d0b4876126b7b08e3892.zip |
Increase the number of buffer mapping partitions to 128.
Testing by Amit Kapila, Andres Freund, and myself, with and without
other patches that also aim to improve scalability, seems to indicate
that this change is a significant win over the current value and over
smaller values such as 64. It's not clear how high we can push this
value before it starts to have negative side-effects elsewhere, but
going this far looks OK.
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/storage/lmgr/lwlock.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/storage/lmgr/lwlock.c b/src/backend/storage/lmgr/lwlock.c index 66fb2e42317..9fe6855945b 100644 --- a/src/backend/storage/lmgr/lwlock.c +++ b/src/backend/storage/lmgr/lwlock.c @@ -73,11 +73,11 @@ static LWLockTranche MainLWLockTranche; /* * We use this structure to keep track of locked LWLocks for release - * during error recovery. The maximum size could be determined at runtime - * if necessary, but it seems unlikely that more than a few locks could - * ever be held simultaneously. + * during error recovery. Normally, only a few will be held at once, but + * occasionally the number can be much higher; for example, the pg_buffercache + * extension locks all buffer partitions simultaneously. */ -#define MAX_SIMUL_LWLOCKS 100 +#define MAX_SIMUL_LWLOCKS 200 static int num_held_lwlocks = 0; static LWLock *held_lwlocks[MAX_SIMUL_LWLOCKS]; |