Commit 642d21a5 authored by Tom Lane's avatar Tom Lane

Move default NBuffers setting into config.h, and rename it

to DEF_NBUFFERS for readability.  Make sure the default value is OK
according to postmaster.c's new sanity check for -B values.
parent d9e223d5
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_init.c,v 1.23 1999/05/25 16:10:56 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_init.c,v 1.24 1999/06/12 22:17:24 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -50,7 +50,7 @@ long *CurTraceBuf; ...@@ -50,7 +50,7 @@ long *CurTraceBuf;
#endif /* BMTRACE */ #endif /* BMTRACE */
int ShowPinTrace = 0; int ShowPinTrace = 0;
int NBuffers = NDBUFS; /* NDBUFS defined in miscadmin.h */ int NBuffers = DEF_NBUFFERS; /* default is set in config.h */
int Data_Descriptors; int Data_Descriptors;
int Free_List_Descriptor; int Free_List_Descriptor;
int Lookup_List_Descriptor; int Lookup_List_Descriptor;
......
...@@ -21,6 +21,15 @@ ...@@ -21,6 +21,15 @@
*/ */
#define MAXBACKENDS (DEF_MAXBACKENDS > 1024 ? DEF_MAXBACKENDS : 1024) #define MAXBACKENDS (DEF_MAXBACKENDS > 1024 ? DEF_MAXBACKENDS : 1024)
/*
* Default number of buffers in shared buffer pool (each of size BLCKSZ).
* This is just the default setting for the postmaster's -B switch.
* Perhaps it ought to be configurable from a configure switch.
* NOTE: default setting corresponds to the minimum number of buffers
* that postmaster.c will allow for the default MaxBackends value.
*/
#define DEF_NBUFFERS (DEF_MAXBACKENDS > 8 ? DEF_MAXBACKENDS * 2 : 16)
/* /*
* Size of a disk block --- currently, this limits the size of a tuple. * Size of a disk block --- currently, this limits the size of a tuple.
* You can set it bigger if you need bigger tuples. * You can set it bigger if you need bigger tuples.
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: miscadmin.h,v 1.39 1999/05/25 16:13:23 momjian Exp $ * $Id: miscadmin.h,v 1.40 1999/06/12 22:17:23 tgl Exp $
* *
* NOTES * NOTES
* some of the information in this file will be moved to * some of the information in this file will be moved to
...@@ -102,12 +102,6 @@ extern Oid LastOidProcessed; /* for query rewrite */ ...@@ -102,12 +102,6 @@ extern Oid LastOidProcessed; /* for query rewrite */
/* #define MAX_QUERY_SIZE (BLCKSZ*2) */ /* #define MAX_QUERY_SIZE (BLCKSZ*2) */
#define MAX_PARSE_BUFFER MAX_QUERY_SIZE #define MAX_PARSE_BUFFER MAX_QUERY_SIZE
/*
* default number of buffers in buffer pool
*
*/
#define NDBUFS 64
/***************************************************************************** /*****************************************************************************
* pdir.h -- * * pdir.h -- *
* POSTGRES directory path definitions. * * POSTGRES directory path definitions. *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment