diff options
author | Robert Haas <rhaas@postgresql.org> | 2012-01-06 14:30:23 -0500 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2012-01-06 14:32:18 -0500 |
commit | 33aaa139e6302e81b4fbf2570be20188bb974c4f (patch) | |
tree | 466507264e6b98956d50184e95118e731f9d5408 /src/include/access/clog.h | |
parent | 7a72efda72a85eef1513f2a02449e24dc4bdfc74 (diff) |
Make the number of CLOG buffers adaptive, based on shared_buffers.
Previously, this was hardcoded: we always had 8. Performance testing
shows that isn't enough, especially on big SMP systems, so we allow it
to scale up as high as 32 when there's adequate memory. On the flip
side, when shared_buffers is very small, drop the number of CLOG buffers
down to as little as 4, so that we can start the postmaster even
when very little shared memory is available.
Per extensive discussion with Simon Riggs, Tom Lane, and others on
pgsql-hackers.
Diffstat (limited to 'src/include/access/clog.h')
-rw-r--r-- | src/include/access/clog.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/include/access/clog.h b/src/include/access/clog.h index 9cf54a44869..bed3b8cf265 100644 --- a/src/include/access/clog.h +++ b/src/include/access/clog.h @@ -28,14 +28,11 @@ typedef int XidStatus; #define TRANSACTION_STATUS_SUB_COMMITTED 0x03 -/* Number of SLRU buffers to use for clog */ -#define NUM_CLOG_BUFFERS 8 - - extern void TransactionIdSetTreeStatus(TransactionId xid, int nsubxids, TransactionId *subxids, XidStatus status, XLogRecPtr lsn); extern XidStatus TransactionIdGetStatus(TransactionId xid, XLogRecPtr *lsn); +extern Size CLOGShmemBuffers(void); extern Size CLOGShmemSize(void); extern void CLOGShmemInit(void); extern void BootStrapCLOG(void); |