#include "commands/explain.h"
#include "executor/instrument.h"
+#include "utils/guc.h"
PG_MODULE_MAGIC;
#include "access/gist.h"
#include "access/skey.h"
+#include "utils/array.h"
#include "utils/builtins.h"
#include "cubedata.h"
#include "pgstat.h"
#include "storage/fd.h"
#include "storage/ipc.h"
+#include "storage/spin.h"
#include "tcop/utility.h"
#include "utils/builtins.h"
#include "commands/trigger.h"
#include "tsearch/ts_utils.h"
#include "utils/builtins.h"
+#include "utils/guc.h"
#include "utils/syscache.h"
PG_MODULE_MAGIC;
#include "commands/defrem.h"
#include "commands/tablespace.h"
#include "nodes/makefuncs.h"
+#include "utils/array.h"
#include "utils/attoptcache.h"
#include "utils/builtins.h"
+#include "utils/guc.h"
#include "utils/memutils.h"
#include "utils/rel.h"
#include "access/gin.h"
#include "access/skey.h"
+#include "utils/array.h"
#include "utils/builtins.h"
#include "utils/lsyscache.h"
#include "access/transam.h"
#include "access/xlog.h"
#include "storage/fd.h"
+#include "storage/shmem.h"
#include "miscadmin.h"
#include "access/multixact.h"
#include "access/twophase_rmgr.h"
#include "pgstat.h"
+#include "storage/lock.h"
#include "storage/predicate.h"
#include "miscadmin.h"
#include "postmaster/autovacuum.h"
#include "storage/pmsignal.h"
+#include "storage/proc.h"
#include "utils/syscache.h"
#include "libpq/be-fsstubs.h"
#include "miscadmin.h"
#include "pgstat.h"
+#include "replication/walsender.h"
+#include "replication/syncrep.h"
#include "storage/lmgr.h"
#include "storage/predicate.h"
#include "storage/procarray.h"
#include "storage/sinvaladt.h"
#include "storage/smgr.h"
#include "utils/combocid.h"
+#include "utils/guc.h"
#include "utils/inval.h"
#include "utils/memutils.h"
#include "utils/relmapper.h"
#include "access/xlogutils.h"
#include "catalog/catalog.h"
#include "storage/smgr.h"
+#include "utils/guc.h"
+#include "utils/hsearch.h"
#include "utils/rel.h"
#include "replication/walreceiver.h"
#include "storage/bufmgr.h"
#include "storage/ipc.h"
+#include "storage/proc.h"
#include "tcop/tcopprot.h"
#include "utils/builtins.h"
#include "utils/fmgroids.h"
#include "utils/acl.h"
#include "utils/builtins.h"
#include "utils/fmgroids.h"
+#include "utils/guc.h"
#include "utils/lsyscache.h"
#include "utils/syscache.h"
#include "utils/tqual.h"
#include "storage/smgr.h"
#include "utils/builtins.h"
#include "utils/fmgroids.h"
+#include "utils/guc.h"
#include "utils/inval.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "storage/sinval.h"
#include "utils/acl.h"
#include "utils/builtins.h"
+#include "utils/guc.h"
#include "utils/inval.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "catalog/pg_operator.h"
#include "catalog/pg_type.h"
#include "commands/defrem.h"
+#include "utils/array.h"
#include "utils/builtins.h"
#include "utils/fmgroids.h"
#include "utils/lsyscache.h"
#include "postmaster/autovacuum.h"
#include "storage/bufmgr.h"
#include "storage/lmgr.h"
+#include "storage/proc.h"
#include "storage/procarray.h"
#include "utils/acl.h"
#include "utils/attoptcache.h"
#include "utils/datum.h"
+#include "utils/guc.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "utils/pg_rusage.h"
#include "commands/async.h"
#include "commands/discard.h"
#include "commands/prepare.h"
+#include "utils/guc.h"
#include "utils/portal.h"
static void DiscardAll(bool isTopLevel);
#include "utils/acl.h"
#include "utils/builtins.h"
#include "utils/fmgroids.h"
+#include "utils/guc.h"
#include "utils/lsyscache.h"
#include "utils/rel.h"
#include "utils/syscache.h"
#include "parser/parse_func.h"
#include "parser/parse_oper.h"
#include "storage/lmgr.h"
+#include "storage/proc.h"
#include "storage/procarray.h"
#include "utils/acl.h"
#include "utils/builtins.h"
#include "miscadmin.h"
#include "nodes/makefuncs.h"
#include "storage/lmgr.h"
+#include "storage/proc.h"
#include "storage/smgr.h"
#include "utils/acl.h"
#include "utils/builtins.h"
#include "utils/acl.h"
#include "utils/builtins.h"
#include "utils/fmgroids.h"
+#include "utils/guc.h"
#include "utils/memutils.h"
#include "utils/rel.h"
#include "utils/tqual.h"
#include "postmaster/autovacuum.h"
#include "storage/bufmgr.h"
#include "storage/lmgr.h"
+#include "storage/proc.h"
#include "storage/procarray.h"
#include "utils/acl.h"
#include "utils/fmgroids.h"
+#include "utils/guc.h"
#include "utils/memutils.h"
#include "utils/snapmgr.h"
#include "utils/syscache.h"
#include "executor/execdebug.h"
#include "executor/nodeIndexscan.h"
#include "optimizer/clauses.h"
+#include "utils/array.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "utils/rel.h"
#include "executor/nodeSubplan.h"
#include "nodes/makefuncs.h"
#include "optimizer/clauses.h"
+#include "utils/array.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "executor/nodeTidscan.h"
#include "optimizer/clauses.h"
#include "storage/bufmgr.h"
+#include "utils/array.h"
#include "utils/rel.h"
#include "optimizer/clauses.h"
#include "optimizer/planmain.h"
#include "optimizer/predtest.h"
+#include "utils/array.h"
#include "utils/inval.h"
#include "utils/lsyscache.h"
#include "utils/syscache.h"
#include "parser/parse_relation.h"
#include "parser/parse_target.h"
#include "rewrite/rewriteManip.h"
+#include "utils/guc.h"
#include "utils/lsyscache.h"
#include "utils/rel.h"
#include "miscadmin.h"
#include "pgstat.h"
#include "postmaster/bgwriter.h"
+#include "replication/syncrep.h"
#include "storage/bufmgr.h"
#include "storage/ipc.h"
+#include "storage/lwlock.h"
#include "storage/pmsignal.h"
+#include "storage/shmem.h"
#include "storage/smgr.h"
+#include "storage/spin.h"
+#include "utils/guc.h"
#include "utils/memutils.h"
#include "utils/resowner.h"
#include "postmaster/walwriter.h"
#include "storage/bufmgr.h"
#include "storage/ipc.h"
+#include "storage/lwlock.h"
#include "storage/pmsignal.h"
#include "storage/smgr.h"
+#include "utils/guc.h"
+#include "utils/hsearch.h"
#include "utils/memutils.h"
#include "utils/resowner.h"
#include "access/xact.h"
#include "miscadmin.h"
+#include "replication/syncrep.h"
+#include "replication/walsender.h"
#include "storage/pmsignal.h"
+#include "storage/proc.h"
#include "tcop/tcopprot.h"
#include "utils/builtins.h"
#include "utils/ps_status.h"
#define SyncStandbysDefined() \
(SyncRepStandbyNames != NULL && SyncRepStandbyNames[0] != '\0')
+#define SyncRepRequested() \
+ (max_wal_senders > 0 && synchronous_commit > SYNCHRONOUS_COMMIT_LOCAL_FLUSH)
+
static bool announce_next_takeover = true;
static void SyncRepQueueInsert(void);
#include "miscadmin.h"
#include "replication/walprotocol.h"
#include "replication/walreceiver.h"
+#include "replication/walsender.h"
#include "storage/ipc.h"
#include "storage/pmsignal.h"
#include "storage/procarray.h"
+#include "utils/guc.h"
#include "utils/ps_status.h"
#include "utils/resowner.h"
#include "access/xlog_internal.h"
#include "replication/walreceiver.h"
#include "storage/pmsignal.h"
+#include "storage/shmem.h"
WalRcvData *WalRcv = NULL;
#include "miscadmin.h"
#include "nodes/replnodes.h"
#include "replication/basebackup.h"
+#include "replication/syncrep.h"
#include "replication/walprotocol.h"
#include "replication/walreceiver.h"
#include "replication/walsender.h"
#include "access/twophase.h"
#include "miscadmin.h"
#include "storage/procarray.h"
+#include "storage/spin.h"
#include "utils/builtins.h"
#include "utils/snapmgr.h"
#include "bootstrap/bootstrap.h"
#include "commands/async.h"
#include "miscadmin.h"
+#include "storage/latch.h"
#include "storage/ipc.h"
#include "storage/sinval.h"
#include "tcop/tcopprot.h"
#include "pg_trace.h"
#include "storage/ipc.h"
#include "storage/predicate.h"
+#include "storage/proc.h"
+#include "storage/spin.h"
/* We use the ShmemLock spinlock to protect LWLockAssign */
#include "storage/bufmgr.h"
#include "storage/ipc.h"
#include "storage/smgr.h"
+#include "utils/hsearch.h"
#include "utils/inval.h"
#include "funcapi.h"
#include "libpq/pqformat.h"
+#include "utils/array.h"
#include "utils/builtins.h"
#include "utils/datum.h"
#include "utils/lsyscache.h"
#include "catalog/indexing.h"
#include "catalog/pg_enum.h"
#include "libpq/pqformat.h"
+#include "utils/array.h"
#include "utils/builtins.h"
#include "utils/fmgroids.h"
#include "utils/snapmgr.h"
#include "catalog/pg_type.h"
#include "funcapi.h"
#include "libpq/pqformat.h"
+#include "utils/array.h"
#include "utils/builtins.h"
#include "catalog/pg_type.h"
#include "funcapi.h"
#include "regex/regex.h"
+#include "utils/array.h"
#include "utils/builtins.h"
#define PG_GETARG_TEXT_PP_IF_EXISTS(_n) \
#include "miscadmin.h"
#include "utils/builtins.h"
#include "utils/fmgroids.h"
+#include "utils/guc.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "utils/rel.h"
#include "rewrite/rewriteHandler.h"
#include "rewrite/rewriteManip.h"
#include "rewrite/rewriteSupport.h"
+#include "utils/array.h"
#include "utils/builtins.h"
#include "utils/fmgroids.h"
#include "utils/lsyscache.h"
#include "rewrite/rewriteDefine.h"
#include "storage/lmgr.h"
#include "storage/smgr.h"
+#include "utils/array.h"
#include "utils/builtins.h"
#include "utils/fmgroids.h"
#include "utils/inval.h"
#include "catalog/storage.h"
#include "miscadmin.h"
#include "storage/fd.h"
+#include "storage/lwlock.h"
#include "utils/inval.h"
#include "utils/relmapper.h"
#include "commands/tablespace.h"
#include "miscadmin.h"
#include "optimizer/cost.h"
+#include "utils/hsearch.h"
#include "utils/inval.h"
#include "utils/spccache.h"
#include "utils/syscache.h"
#include "funcapi.h"
#include "nodes/nodeFuncs.h"
#include "parser/parse_coerce.h"
+#include "utils/array.h"
#include "utils/builtins.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "postgres.h"
#include "access/xact.h"
+#include "storage/shmem.h"
+#include "storage/spin.h"
#include "utils/dynahash.h"
#include "utils/memutils.h"
#include "access/hash.h"
#include "storage/predicate.h"
+#include "storage/proc.h"
#include "utils/memutils.h"
#include "utils/rel.h"
#include "utils/snapmgr.h"
#include "postgres.h"
+#include "access/htup.h"
#include "access/xact.h"
#include "utils/combocid.h"
+#include "utils/hsearch.h"
#include "utils/memutils.h"
#include "access/transam.h"
#include "access/xact.h"
#include "storage/predicate.h"
+#include "storage/proc.h"
#include "storage/procarray.h"
#include "utils/memutils.h"
#include "utils/memutils.h"
#define GIN_H
#include "access/xlog.h"
+#include "storage/block.h"
#include "utils/relcache.h"
#include "access/sdir.h"
#include "access/skey.h"
#include "access/xlog.h"
+#include "nodes/primnodes.h"
+#include "storage/lock.h"
#include "utils/relcache.h"
#include "utils/snapshot.h"
#define XACT_H
#include "access/xlog.h"
+#include "nodes/pg_list.h"
+#include "storage/relfilenode.h"
/*
#include "access/rmgr.h"
#include "access/xlogdefs.h"
#include "lib/stringinfo.h"
-#include "replication/walsender.h"
#include "storage/buf.h"
#include "utils/pg_crc.h"
#include "utils/timestamp.h"
#define XLOG_INTERNAL_H
#include "access/xlog.h"
+#include "storage/block.h"
+#include "storage/relfilenode.h"
/*
#define STORAGE_H
#include "access/xlog.h"
+#include "storage/block.h"
+#include "storage/relfilenode.h"
#include "utils/relcache.h"
extern void RelationCreateStorage(RelFileNode rnode, char relpersistence);
#define COPY_H
#include "nodes/execnodes.h"
+#include "nodes/parsenodes.h"
+#include "tcop/dest.h"
/* CopyStateData is private in commands/copy.c */
typedef struct CopyStateData *CopyState;
#define DBCOMMANDS_H
#include "access/xlog.h"
+#include "nodes/parsenodes.h"
/* XLOG stuff */
#define XLOG_DBASE_CREATE 0x00
#ifndef PORTALCMDS_H
#define PORTALCMDS_H
+#include "nodes/parsenodes.h"
#include "utils/portal.h"
#ifndef SEQUENCE_H
#define SEQUENCE_H
+#include "nodes/parsenodes.h"
+#include "storage/relfilenode.h"
#include "access/xlog.h"
#define TABLESPACE_H
#include "access/xlog.h"
+#include "nodes/parsenodes.h"
/* XLOG stuff */
#define XLOG_TBLSPC_CREATE 0x00
#define TRIGGER_H
#include "nodes/execnodes.h"
+#include "nodes/parsenodes.h"
/*
* TriggerData is the node type that is passed as fmgr "context" info
#define EXECDESC_H
#include "nodes/execnodes.h"
+#include "tcop/dest.h"
/* ----------------
#define FUNCTIONS_H
#include "nodes/execnodes.h"
+#include "tcop/dest.h"
/* This struct is known only within executor/functions.c */
typedef struct SQLFunctionParseInfo *SQLFunctionParseInfoPtr;
#ifndef SPI_H
#define SPI_H
+#include "nodes/parsenodes.h"
#include "utils/portal.h"
#ifndef _SYNCREP_H
#define _SYNCREP_H
-#include "access/xlog.h"
-#include "storage/proc.h"
-#include "storage/shmem.h"
-#include "storage/spin.h"
#include "utils/guc.h"
-#define SyncRepRequested() \
- (max_wal_senders > 0 && synchronous_commit > SYNCHRONOUS_COMMIT_LOCAL_FLUSH)
-
/* syncRepState */
#define SYNC_REP_NOT_WAITING 0
#define SYNC_REP_WAITING 1
/* called by various procs */
extern int SyncRepWakeQueue(bool all);
+
extern bool check_synchronous_standby_names(char **newval, void **extra, GucSource source);
#endif /* _SYNCREP_H */
#ifndef _WALSENDER_H
#define _WALSENDER_H
-#include "fmgr.h"
+#include "access/xlog.h"
#include "nodes/nodes.h"
#include "storage/latch.h"
-#include "replication/syncrep.h"
#include "storage/shmem.h"
#include "storage/spin.h"
#define STANDBY_H
#include "access/xlog.h"
+#include "storage/lock.h"
#include "storage/procsignal.h"
+#include "storage/relfilenode.h"
/* User-settable GUC parameters */
extern int vacuum_defer_cleanup_age;
#ifndef PQUERY_H
#define PQUERY_H
+#include "nodes/parsenodes.h"
#include "utils/portal.h"
#define TCOPPROT_H
#include "executor/execdesc.h"
+#include "nodes/parsenodes.h"
#include "storage/procsignal.h"
+#include "utils/guc.h"
/* Required daylight between max_stack_depth and the kernel limit, in bytes */
#include "nodes/makefuncs.h"
#include "parser/parse_type.h"
#include "utils/builtins.h"
+#include "utils/guc.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "utils/rel.h"
#include "funcapi.h"
#include "miscadmin.h"
#include "utils/builtins.h"
+#include "utils/guc.h"
#include "utils/lsyscache.h"
#include "utils/syscache.h"