提交 a619808f 编写于 作者: H Heikki Linnakangas

Remove checkpoint.h, and move the definitions in it to bgwriter.h.

Having a "checkpoint.h", corresponding to "checkpoint.c", makes perfect
sense, but those function definitions are in bgwriter.h in PostgreSQL, and
keeping the code as close to upstream as possible trumps the consistency of
keeping definitions for "foo.c" in header file called "foo.h". Keeping
things close to upstream makes merging easier.
上级 4d3a6c1f
......@@ -48,8 +48,8 @@
#include "libpq/hba.h"
#include "miscadmin.h"
#include "pgstat.h"
#include "postmaster/bgwriter.h"
#include "postmaster/postmaster.h"
#include "postmaster/checkpoint.h"
#include "storage/bufpage.h"
#include "storage/fd.h"
#include "storage/ipc.h"
......
......@@ -36,7 +36,6 @@
#include "miscadmin.h"
#include "nodes/makefuncs.h"
#include "postmaster/bgwriter.h"
#include "postmaster/checkpoint.h"
#include "postmaster/primary_mirror_mode.h"
#include "replication/walreceiver.h"
#include "storage/freespace.h"
......
......@@ -39,7 +39,6 @@
#include "cdb/cdbtm.h"
#include "cdb/cdbfts.h"
#include "libpq/ip.h"
#include "postmaster/checkpoint.h"
#include "catalog/indexing.h"
#include "utils/faultinjection.h"
......
......@@ -46,7 +46,6 @@
#include "mb/pg_wchar.h"
#include "miscadmin.h"
#include "pgstat.h"
#include "postmaster/checkpoint.h"
#include "postmaster/bgwriter.h"
#include "storage/freespace.h"
#include "storage/ipc.h"
......
......@@ -42,7 +42,6 @@
#include "access/xlog_internal.h"
#include "libpq/pqsignal.h"
#include "miscadmin.h"
#include "postmaster/checkpoint.h"
#include "postmaster/bgwriter.h"
#include "storage/fd.h"
#include "storage/freespace.h"
......
......@@ -120,11 +120,11 @@
#include "miscadmin.h"
#include "pgstat.h"
#include "postmaster/autovacuum.h"
#include "postmaster/bgwriter.h"
#include "postmaster/fork_process.h"
#include "postmaster/pgarch.h"
#include "postmaster/postmaster.h"
#include "postmaster/seqserver.h"
#include "postmaster/checkpoint.h"
#include "postmaster/fts.h"
#include "postmaster/perfmon.h"
#include "postmaster/primary_mirror_mode.h"
......
......@@ -42,7 +42,6 @@
#include "pgstat.h"
#include "postmaster/autovacuum.h"
#include "postmaster/bgwriter.h"
#include "postmaster/checkpoint.h"
#include "postmaster/postmaster.h"
#include "postmaster/primary_mirror_mode.h"
#include "postmaster/seqserver.h"
......
......@@ -52,7 +52,7 @@
#include "commands/view.h"
#include "miscadmin.h"
#include "optimizer/planmain.h"
#include "postmaster/checkpoint.h"
#include "postmaster/bgwriter.h"
#include "rewrite/rewriteDefine.h"
#include "rewrite/rewriteRemove.h"
#include "storage/fd.h"
......
......@@ -24,7 +24,7 @@
#include "cdb/cdbfilerep.h"
#include "cdb/cdbfilerepservice.h"
#include "cdb/cdbresynchronizechangetracking.h"
#include "postmaster/checkpoint.h"
#include "postmaster/bgwriter.h"
#include "cdb/cdbutil.h"
#include "postmaster/fts.h"
#include "storage/spin.h"
......
......@@ -50,7 +50,6 @@
#include "pgstat.h"
#include "postmaster/autovacuum.h"
#include "postmaster/bgwriter.h"
#include "postmaster/checkpoint.h"
#include "postmaster/postmaster.h"
#include "postmaster/syslogger.h"
#include "replication/walsender.h"
......
......@@ -18,8 +18,13 @@
/* GUC options */
extern int BgWriterDelay;
extern int CheckPointTimeout;
extern int CheckPointWarning;
extern void BackgroundWriterMain(void);
extern void CheckpointMain(void);
extern void RequestCheckpoint(bool waitforit, bool warnontime);
extern void RequestCheckpointSmgrCloseAll(void);
......@@ -29,6 +34,9 @@ extern void AbsorbFsyncRequests(void);
extern Size BgWriterShmemSize(void);
extern void BgWriterShmemInit(void);
extern Size CheckpointShmemSize(void);
extern void CheckpointShmemInit(void);
extern bool AmBackgroundWriterProcess(void);
#endif /* _BGWRITER_H */
/*-------------------------------------------------------------------------
*
* checkpoint.h
* Exports from postmaster/checkpoint.c.
*
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
*
*-------------------------------------------------------------------------
*/
#ifndef _CHECKPOINT_H
#define _CHECKPOINT_H
/* GUC options */
extern int CheckPointTimeout;
extern int CheckPointWarning;
extern void CheckpointMain(void);
extern void RequestCheckpoint(bool waitforit, bool warnontime);
extern Size CheckpointShmemSize(void);
extern void CheckpointShmemInit(void);
extern int checkpoint_start(void);
#endif /* _CHECKPOINT_H */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册