From 85178327350e741a281a9a44283c7bf320950607 Mon Sep 17 00:00:00 2001 From: MasaoFujii Date: Mon, 22 Nov 2010 11:33:53 +0900 Subject: [PATCH] Revert "Add the definition of replication modes." This reverts commit 4b390ba3022a7515772a621001bbdf1d82d0e371. This is for moving replication_mode from recovery.conf to postgresql.conf --- src/backend/access/transam/xlog.c | 24 ------------------------ src/include/access/xlog.h | 37 ------------------------------------- 2 files changed, 61 deletions(-) diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 25a384b086..014819f766 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -540,16 +540,6 @@ typedef struct xl_parameter_change int wal_level; } xl_parameter_change; -/* Replication mode names */ -const char *ReplicationModeNames[] = { - "async", /* REPLICATION_MODE_ASYNC */ - "recv", /* REPLICATION_MODE_RECV */ - "fsync", /* REPLICATION_MODE_FSYNC */ - "apply" /* REPLICATION_MODE_APPLY */ -}; - -ReplicationMode rplMode = InvalidReplicationMode; - /* * Flags set by interrupt handlers for later service in the redo loop. */ @@ -9757,17 +9747,3 @@ WakeupRecovery(void) { SetLatch(&XLogCtl->recoveryWakeupLatch); } - -/* - * Look up replication mode value by name. - */ -ReplicationMode -ReplicationModeNameGetValue(char *name) -{ - ReplicationMode mode; - - for (mode = 0; mode <= MAXREPLICATIONMODE; mode++) - if (strcmp(ReplicationModeNames[mode], name) == 0) - return mode; - return InvalidReplicationMode; -} diff --git a/src/include/access/xlog.h b/src/include/access/xlog.h index a86bf32496..ea156d3834 100644 --- a/src/include/access/xlog.h +++ b/src/include/access/xlog.h @@ -189,41 +189,6 @@ typedef enum extern XLogRecPtr XactLastRecEnd; -/* - * Replication mode. This is used to identify how long transaction - * commit should wait for replication. - * - * REPLICATION_MODE_ASYNC doesn't make transaction commit wait for - * replication, i.e., asynchronous replication. - * - * REPLICATION_MODE_RECV makes transaction commit wait for XLOG - * records to be received on the standby. - * - * REPLICATION_MODE_FSYNC makes transaction commit wait for XLOG - * records to be received and fsync'd on the standby. - * - * REPLICATION_MODE_APPLY makes transaction commit wait for XLOG - * records to be received, fsync'd and applied on the standby. - */ -typedef enum ReplicationMode -{ - InvalidReplicationMode = -1, - REPLICATION_MODE_ASYNC = 0, - REPLICATION_MODE_RECV, - REPLICATION_MODE_FSYNC, - REPLICATION_MODE_APPLY - - /* - * NOTE: if you add a new mode, change MAXREPLICATIONMODE below - * and update the ReplicationModeNames array in xlog.c - */ -} ReplicationMode; - -#define MAXREPLICATIONMODE REPLICATION_MODE_APPLY - -extern const char *ReplicationModeNames[]; -extern ReplicationMode rplMode; - /* these variables are GUC parameters related to XLOG */ extern int CheckPointSegments; extern int wal_keep_segments; @@ -340,6 +305,4 @@ extern void HandleStartupProcInterrupts(void); extern void StartupProcessMain(void); extern void WakeupRecovery(void); -extern ReplicationMode ReplicationModeNameGetValue(char *name); - #endif /* XLOG_H */ -- 2.11.0