1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-16 06:01:02 +03:00

Get rid of slru.c's hardwired insistence on a fixed number of slots per

SLRU area.  The number of slots is still a compile-time constant (someday
we might want to change that), but at least it's a different constant for
each SLRU area.  Increase number of subtrans buffers to 32 based on
experimentation with a heavily subtrans-bashing test case, and increase
number of multixact member buffers to 16, since it's obviously silly for
it not to be at least twice the number of multixact offset buffers.
This commit is contained in:
Tom Lane
2005-12-06 23:08:34 +00:00
parent 3001b4697d
commit 887a7c61f6
9 changed files with 118 additions and 65 deletions

View File

@ -24,7 +24,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/backend/access/transam/clog.c,v 1.35 2005/12/06 18:10:06 tgl Exp $
* $PostgreSQL: pgsql/src/backend/access/transam/clog.c,v 1.36 2005/12/06 23:08:32 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -147,14 +147,15 @@ TransactionIdGetStatus(TransactionId xid)
Size
CLOGShmemSize(void)
{
return SimpleLruShmemSize();
return SimpleLruShmemSize(NUM_CLOG_BUFFERS);
}
void
CLOGShmemInit(void)
{
ClogCtl->PagePrecedes = CLOGPagePrecedes;
SimpleLruInit(ClogCtl, "CLOG Ctl", CLogControlLock, "pg_clog");
SimpleLruInit(ClogCtl, "CLOG Ctl", NUM_CLOG_BUFFERS,
CLogControlLock, "pg_clog");
}
/*