OSDN Git Service

Revert "Add the definition of replication modes."
authorMasaoFujii <masao.fujii@gmail.com>
Mon, 22 Nov 2010 02:33:53 +0000 (11:33 +0900)
committerMasaoFujii <masao.fujii@gmail.com>
Mon, 22 Nov 2010 02:33:53 +0000 (11:33 +0900)
This reverts commit 4b390ba3022a7515772a621001bbdf1d82d0e371.

This is for moving replication_mode from recovery.conf to postgresql.conf

src/backend/access/transam/xlog.c
src/include/access/xlog.h

index 25a384b..014819f 100644 (file)
@@ -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;
-}
index a86bf32..ea156d3 100644 (file)
@@ -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 */