Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit642d21a

Browse files
committed
Move default NBuffers setting into config.h, and rename it
to DEF_NBUFFERS for readability. Make sure the default value is OKaccording to postmaster.c's new sanity check for -B values.
1 parentd9e223d commit642d21a

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

‎src/backend/storage/buffer/buf_init.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_init.c,v 1.23 1999/05/25 16:10:56 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_init.c,v 1.24 1999/06/12 22:17:24 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -50,7 +50,7 @@ long *CurTraceBuf;
5050
#endif/* BMTRACE */
5151
intShowPinTrace=0;
5252

53-
intNBuffers=NDBUFS;/*NDBUFS definedinmiscadmin.h */
53+
intNBuffers=DEF_NBUFFERS;/*default is setinconfig.h */
5454
intData_Descriptors;
5555
intFree_List_Descriptor;
5656
intLookup_List_Descriptor;

‎src/include/config.h.in

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@
2121
*/
2222
#defineMAXBACKENDS(DEF_MAXBACKENDS > 1024 ? DEF_MAXBACKENDS : 1024)
2323

24+
/*
25+
* Default number of buffers in shared buffer pool (each of size BLCKSZ).
26+
* This is just the default setting for the postmaster's -B switch.
27+
* Perhaps it ought to be configurable from a configure switch.
28+
* NOTE: default setting corresponds to the minimum number of buffers
29+
* that postmaster.c will allow for the default MaxBackends value.
30+
*/
31+
#defineDEF_NBUFFERS (DEF_MAXBACKENDS > 8 ? DEF_MAXBACKENDS * 2 : 16)
32+
2433
/*
2534
* Size of a disk block --- currently, this limits the size of a tuple.
2635
* You can set it bigger if you need bigger tuples.

‎src/include/miscadmin.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
* Copyright (c) 1994, Regents of the University of California
1313
*
14-
* $Id: miscadmin.h,v 1.39 1999/05/25 16:13:23momjian Exp $
14+
* $Id: miscadmin.h,v 1.40 1999/06/12 22:17:23tgl Exp $
1515
*
1616
* NOTES
1717
* some of the information in this file will be moved to
@@ -102,12 +102,6 @@ extern OidLastOidProcessed;/* for query rewrite */
102102
/* #define MAX_QUERY_SIZE (BLCKSZ*2) */
103103
#defineMAX_PARSE_BUFFER MAX_QUERY_SIZE
104104

105-
/*
106-
*default number of buffers in buffer pool
107-
*
108-
*/
109-
#defineNDBUFS 64
110-
111105
/*****************************************************************************
112106
* pdir.h -- *
113107
*POSTGRES directory path definitions. *

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp