1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-13 16:22:44 +03:00

Separate out bgwriter code into a logically separate module, rather

than being random pieces of other files.  Give bgwriter responsibility
for all checkpoint activity (other than a post-recovery checkpoint);
so this child process absorbs the functionality of the former transient
checkpoint and shutdown subprocesses.  While at it, create an actual
include file for postmaster.c, which for some reason never had its own
file before.
This commit is contained in:
Tom Lane
2004-05-29 22:48:23 +00:00
parent d531fd2cdc
commit 076a055acf
28 changed files with 1133 additions and 902 deletions

View File

@@ -37,7 +37,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.138 2004/05/28 03:11:15 tgl Exp $
* $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.139 2004/05/29 22:48:21 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -57,6 +57,7 @@
#include "mb/pg_wchar.h"
#include "miscadmin.h"
#include "pgtime.h"
#include "postmaster/postmaster.h"
#include "storage/ipc.h"
#include "tcop/tcopprot.h"
#include "utils/memutils.h"

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/init/globals.c,v 1.88 2004/05/28 05:13:15 tgl Exp $
* $PostgreSQL: pgsql/src/backend/utils/init/globals.c,v 1.89 2004/05/29 22:48:21 tgl Exp $
*
* NOTES
* Globals used all over the place should be declared here and not
@@ -85,7 +85,10 @@ bool enableFsync = true;
bool allowSystemTableMods = false;
int work_mem = 1024;
int maintenance_work_mem = 16384;
/* Primary determinants of sizes of shared-memory structures: */
int NBuffers = 1000;
int MaxBackends = 100;
int VacuumCostPageHit = 1; /* GUC parameters for vacuum */
int VacuumCostPageMiss = 10;

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/init/postinit.c,v 1.132 2004/05/27 17:12:54 tgl Exp $
* $PostgreSQL: pgsql/src/backend/utils/init/postinit.c,v 1.133 2004/05/29 22:48:21 tgl Exp $
*
*
*-------------------------------------------------------------------------
@@ -29,6 +29,7 @@
#include "commands/trigger.h"
#include "mb/pg_wchar.h"
#include "miscadmin.h"
#include "postmaster/postmaster.h"
#include "storage/backendid.h"
#include "storage/ipc.h"
#include "storage/proc.h"

View File

@@ -10,7 +10,7 @@
* Written by Peter Eisentraut <peter_e@gmx.net>.
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.208 2004/05/26 15:07:39 momjian Exp $
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.209 2004/05/29 22:48:21 tgl Exp $
*
*--------------------------------------------------------------------
*/
@@ -44,6 +44,8 @@
#include "optimizer/prep.h"
#include "parser/parse_expr.h"
#include "parser/parse_relation.h"
#include "postmaster/bgwriter.h"
#include "postmaster/postmaster.h"
#include "storage/bufmgr.h"
#include "storage/fd.h"
#include "storage/freespace.h"
@@ -65,15 +67,10 @@
#endif
/* XXX these should appear in other modules' header files */
extern bool Log_connections;
extern bool Log_disconnections;
extern DLLIMPORT bool check_function_bodies;
extern int PreAuthDelay;
extern int AuthenticationTimeout;
extern int CheckPointTimeout;
extern int CommitDelay;
extern int CommitSiblings;
extern char *preload_libraries_string;
extern int DebugSharedBuffers;
static const char *assign_log_destination(const char *value,
@@ -1262,7 +1259,7 @@ static struct config_int ConfigureNamesInt[] =
NULL
},
&BgWriterPercent,
1, 0, 100, NULL, NULL
1, 1, 100, NULL, NULL
},
{
@@ -1270,7 +1267,7 @@ static struct config_int ConfigureNamesInt[] =
gettext_noop("Background writer maximum number of pages to flush per round"),
NULL
},
&BgWriterMaxpages,
&BgWriterMaxPages,
100, 1, 1000, NULL, NULL
},