Removal of archive in wal_level

Started by Michael Paquierabout 12 years ago6 messages
#1Michael Paquier
michael.paquier@gmail.com
1 attachment(s)

Hi all,

Following the discussions done these last days about wal_level like this one:
/messages/by-id/CABUevEwigM-pPoBKGdkm6LZyO+OVrdz7sOXN_5By8e8PcaE3sA@mail.gmail.com
Please find attached a patch doing what is written in the $subject.

Thoughts?
--
Michael

Attachments:

20131104_archive_less.patchtext/x-patch; charset=US-ASCII; name=20131104_archive_less.patchDownload
commit 5a06f45ca85e44708e0b6ea6e9af21bc9ff8be90
Author: Michael Paquier <michael@otacoo.com>
Date:   Mon Nov 4 02:33:32 2013 +0000

    Remove "archive" in wal_level
    
    archive was justifying its existence in the latest releases because
    users could fallback to it if there were any bugs with the latest
    level implemented hot_standby. There haven't been that many bugs in
    this area for the last couple of releases, so why not simply remove
    it if we also know that the performance overhead that hot_standby
    has compared to archive is minimal... It is also usually recommended
    to use hot_standby instead of archive for normal usages.

diff --git a/src/backend/access/nbtree/nbtpage.c b/src/backend/access/nbtree/nbtpage.c
index f407753..3333af4 100644
--- a/src/backend/access/nbtree/nbtpage.c
+++ b/src/backend/access/nbtree/nbtpage.c
@@ -630,7 +630,7 @@ _bt_getbuf(Relation rel, BlockNumber blkno, int access)
 					 * WAL record that will allow us to conflict with queries
 					 * running on standby.
 					 */
-					if (XLogStandbyInfoActive())
+					if (XLogIsNeeded())
 					{
 						BTPageOpaque opaque = (BTPageOpaque) PageGetSpecialPointer(page);
 
diff --git a/src/backend/access/nbtree/nbtree.c b/src/backend/access/nbtree/nbtree.c
index 073190f..81f7c75 100644
--- a/src/backend/access/nbtree/nbtree.c
+++ b/src/backend/access/nbtree/nbtree.c
@@ -826,7 +826,7 @@ btvacuumscan(IndexVacuumInfo *info, IndexBulkDeleteResult *stats,
 	 * take care to issue the record for last actual block and not for the
 	 * last block that was scanned. Ignore empty indexes.
 	 */
-	if (XLogStandbyInfoActive() &&
+	if (XLogIsNeeded() &&
 		num_pages > 1 && vstate.lastBlockVacuumed < (num_pages - 1))
 	{
 		Buffer		buf;
diff --git a/src/backend/access/rmgrdesc/xlogdesc.c b/src/backend/access/rmgrdesc/xlogdesc.c
index 1b36f9a..4735cfb 100644
--- a/src/backend/access/rmgrdesc/xlogdesc.c
+++ b/src/backend/access/rmgrdesc/xlogdesc.c
@@ -26,7 +26,6 @@
  */
 const struct config_enum_entry wal_level_options[] = {
 	{"minimal", WAL_LEVEL_MINIMAL, false},
-	{"archive", WAL_LEVEL_ARCHIVE, false},
 	{"hot_standby", WAL_LEVEL_HOT_STANDBY, false},
 	{NULL, 0, false}
 };
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 0591f3f..75e87f9 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -520,7 +520,7 @@ AssignTransactionId(TransactionState s)
 	 * recovery only because aborted subtransactions are separately WAL
 	 * logged.
 	 */
-	if (isSubXact && XLogStandbyInfoActive())
+	if (isSubXact && XLogIsNeeded())
 	{
 		unreportedXids[nUnreportedXids] = s->transactionId;
 		nUnreportedXids++;
@@ -969,7 +969,7 @@ RecordTransactionCommit(void)
 	/* Get data needed for commit record */
 	nrels = smgrGetPendingDeletes(true, &rels);
 	nchildren = xactGetCommittedChildren(&children);
-	if (XLogStandbyInfoActive())
+	if (XLogIsNeeded())
 		nmsgs = xactGetCommittedInvalidationMessages(&invalMessages,
 													 &RelcacheInitFileInval);
 	wrote_xlog = (XactLastRecEnd != 0);
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 06f5eb0..61d28e5 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -7994,7 +7994,7 @@ CreateCheckPoint(int flags)
 	 * pointer. This allows us to begin accumulating changes to assemble our
 	 * starting snapshot of locks and transactions.
 	 */
-	if (!shutdown && XLogStandbyInfoActive())
+	if (!shutdown && XLogIsNeeded())
 		checkPoint.oldestActiveXid = GetOldestActiveTransactionId();
 	else
 		checkPoint.oldestActiveXid = InvalidTransactionId;
@@ -8189,7 +8189,7 @@ CreateCheckPoint(int flags)
 	 * If we are shutting down, or Startup process is completing crash
 	 * recovery we don't need to write running xact data.
 	 */
-	if (!shutdown && XLogStandbyInfoActive())
+	if (!shutdown && XLogIsNeeded())
 		LogStandbySnapshot();
 
 	START_CRIT_SECTION();
@@ -8990,7 +8990,7 @@ UpdateFullPageWrites(void)
 	 * Write an XLOG_FPW_CHANGE record. This allows us to keep track of
 	 * full_page_writes during archive recovery, if required.
 	 */
-	if (XLogStandbyInfoActive() && !RecoveryInProgress())
+	if (XLogIsNeeded() && !RecoveryInProgress())
 	{
 		XLogRecData rdata;
 
diff --git a/src/backend/storage/ipc/standby.c b/src/backend/storage/ipc/standby.c
index c704412..6fd8988 100644
--- a/src/backend/storage/ipc/standby.c
+++ b/src/backend/storage/ipc/standby.c
@@ -753,7 +753,7 @@ StandbyReleaseOldLocks(int nxids, TransactionId *xids)
  * --------------------------------------------------------------------
  *		Recovery handling for Rmgr RM_STANDBY_ID
  *
- * These record types will only be created if XLogStandbyInfoActive()
+ * These record types will only be created if XLogIsNeeded()
  * --------------------------------------------------------------------
  */
 
@@ -861,7 +861,7 @@ LogStandbySnapshot(void)
 	xl_standby_lock *locks;
 	int			nlocks;
 
-	Assert(XLogStandbyInfoActive());
+	Assert(XLogIsNeeded());
 
 	/*
 	 * Get details of any AccessExclusiveLocks being held at the moment.
diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c
index f4f32e9..5cc8c0e 100644
--- a/src/backend/storage/lmgr/lock.c
+++ b/src/backend/storage/lmgr/lock.c
@@ -800,7 +800,7 @@ LockAcquireExtended(const LOCKTAG *locktag,
 	if (lockmode >= AccessExclusiveLock &&
 		locktag->locktag_type == LOCKTAG_RELATION &&
 		!RecoveryInProgress() &&
-		XLogStandbyInfoActive())
+		XLogIsNeeded())
 	{
 		LogAccessExclusiveLockPrepare();
 		log_lock = true;
diff --git a/src/bin/pg_controldata/pg_controldata.c b/src/bin/pg_controldata/pg_controldata.c
index fde483a..655b0b5 100644
--- a/src/bin/pg_controldata/pg_controldata.c
+++ b/src/bin/pg_controldata/pg_controldata.c
@@ -73,8 +73,6 @@ wal_level_str(WalLevel wal_level)
 	{
 		case WAL_LEVEL_MINIMAL:
 			return "minimal";
-		case WAL_LEVEL_ARCHIVE:
-			return "archive";
 		case WAL_LEVEL_HOT_STANDBY:
 			return "hot_standby";
 	}
diff --git a/src/include/access/xlog.h b/src/include/access/xlog.h
index 002862c..1a89034 100644
--- a/src/include/access/xlog.h
+++ b/src/include/access/xlog.h
@@ -196,22 +196,18 @@ extern int	num_xloginsert_slots;
 typedef enum WalLevel
 {
 	WAL_LEVEL_MINIMAL = 0,
-	WAL_LEVEL_ARCHIVE,
 	WAL_LEVEL_HOT_STANDBY
 } WalLevel;
 extern int	wal_level;
 
-#define XLogArchivingActive()	(XLogArchiveMode && wal_level >= WAL_LEVEL_ARCHIVE)
+#define XLogArchivingActive()	(XLogArchiveMode && wal_level >= WAL_LEVEL_HOT_STANDBY)
 #define XLogArchiveCommandSet() (XLogArchiveCommand[0] != '\0')
 
 /*
- * Is WAL-logging necessary for archival or log-shipping, or can we skip
- * WAL-logging if we fsync() the data before committing instead?
+ * Is WAL-logging necessary for log-shipping, or can we skip WAL-logging if we
+ * fsync() the data before committing instead?
  */
-#define XLogIsNeeded() (wal_level >= WAL_LEVEL_ARCHIVE)
-
-/* Do we need to WAL-log information required only for Hot Standby? */
-#define XLogStandbyInfoActive() (wal_level >= WAL_LEVEL_HOT_STANDBY)
+#define XLogIsNeeded() (wal_level >= WAL_LEVEL_HOT_STANDBY)
 
 #ifdef WAL_DEBUG
 extern bool XLOG_DEBUG;
#2Michael Paquier
michael.paquier@gmail.com
In reply to: Michael Paquier (#1)
1 attachment(s)
Re: Removal of archive in wal_level

Please find attached a patch doing what is written in the $subject.

With the documentation updated, this is even better...
Regards,
--
Michael

Attachments:

20131104_archive_less_v2.patchtext/x-patch; charset=US-ASCII; name=20131104_archive_less_v2.patchDownload
diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml
index ccb76d8..0f20253 100644
--- a/doc/src/sgml/backup.sgml
+++ b/doc/src/sgml/backup.sgml
@@ -582,7 +582,7 @@ tar -cf backup.tar /usr/local/pgsql/data
 
    <para>
     To enable WAL archiving, set the <xref linkend="guc-wal-level">
-    configuration parameter to <literal>archive</> (or <literal>hot_standby</>),
+    configuration parameter to <literal>hot_standby</>,
     <xref linkend="guc-archive-mode"> to <literal>on</>,
     and specify the shell command to use in the <xref
     linkend="guc-archive-command"> configuration parameter.  In practice
@@ -1246,7 +1246,7 @@ restore_command = 'cp /mnt/server/archivedir/%f %p'
       If more flexibility in copying the backup files is needed, a lower
       level process can be used for standalone hot backups as well.
       To prepare for low level standalone hot backups, set <varname>wal_level</> to
-      <literal>archive</> (or <literal>hot_standby</>), <varname>archive_mode</> to
+      <literal>hot_standby</>, <varname>archive_mode</> to
       <literal>on</>, and set up an <varname>archive_command</> that performs
       archiving only when a <emphasis>switch file</> exists.  For example:
 <programlisting>
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 77a9303..2c6a022 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -1606,10 +1606,9 @@ include 'filename'
         <varname>wal_level</> determines how much information is written
         to the WAL. The default value is <literal>minimal</>, which writes
         only the information needed to recover from a crash or immediate
-        shutdown. <literal>archive</> adds logging required for WAL archiving,
-        and <literal>hot_standby</> further adds information required to run
-        read-only queries on a standby server.
-        This parameter can only be set at server start.
+        shutdown. <literal>hot_standby</> adds logging required for WAL
+        archiving and information required to run read-only queries on a
+        standby server. This parameter can only be set at server start.
        </para>
        <para>
         In <literal>minimal</> level, WAL-logging of some bulk
@@ -1625,22 +1624,17 @@ include 'filename'
         </simplelist>
         But minimal WAL does not contain
         enough information to reconstruct the data from a base backup and the
-        WAL logs, so either <literal>archive</> or <literal>hot_standby</>
-        level must be used to enable
+        WAL logs <literal>hot_standby</> level must be used to enable
         WAL archiving (<xref linkend="guc-archive-mode">) and streaming
         replication.
        </para>
        <para>
-        In <literal>hot_standby</> level, the same information is logged as
-        with <literal>archive</>, plus information needed to reconstruct
-        the status of running transactions from the WAL. To enable read-only
-        queries on a standby server, <varname>wal_level</> must be set to
-        <literal>hot_standby</> on the primary, and
-        <xref linkend="guc-hot-standby"> must be enabled in the standby. It is
-        thought that there is
-        little measurable difference in performance between using
-        <literal>hot_standby</> and <literal>archive</> levels, so feedback
-        is welcome if any production impacts are noticeable.
+        In <literal>hot_standby</> level, necessary information is logged
+        to reconstruct the status of running transactions from the WAL and
+        to enable read-only queries on a standby server. Note that
+        <varname>wal_level</> must be set to <literal>hot_standby</> on
+        the primary, and <xref linkend="guc-hot-standby"> must be enabled
+        in the standby.
        </para>
       </listitem>
      </varlistentry>
@@ -2198,8 +2192,8 @@ include 'filename'
         of connections, so the parameter cannot be set higher than
         <xref linkend="guc-max-connections">.  This parameter can only
         be set at server start. <varname>wal_level</> must be set
-        to <literal>archive</> or <literal>hot_standby</> to allow
-        connections from standby servers.
+        to <literal>hot_standby</> to allow connections from standby
+        servers.
        </para>
        </listitem>
       </varlistentry>
diff --git a/src/backend/access/nbtree/nbtpage.c b/src/backend/access/nbtree/nbtpage.c
index f407753..3333af4 100644
--- a/src/backend/access/nbtree/nbtpage.c
+++ b/src/backend/access/nbtree/nbtpage.c
@@ -630,7 +630,7 @@ _bt_getbuf(Relation rel, BlockNumber blkno, int access)
 					 * WAL record that will allow us to conflict with queries
 					 * running on standby.
 					 */
-					if (XLogStandbyInfoActive())
+					if (XLogIsNeeded())
 					{
 						BTPageOpaque opaque = (BTPageOpaque) PageGetSpecialPointer(page);
 
diff --git a/src/backend/access/nbtree/nbtree.c b/src/backend/access/nbtree/nbtree.c
index 073190f..81f7c75 100644
--- a/src/backend/access/nbtree/nbtree.c
+++ b/src/backend/access/nbtree/nbtree.c
@@ -826,7 +826,7 @@ btvacuumscan(IndexVacuumInfo *info, IndexBulkDeleteResult *stats,
 	 * take care to issue the record for last actual block and not for the
 	 * last block that was scanned. Ignore empty indexes.
 	 */
-	if (XLogStandbyInfoActive() &&
+	if (XLogIsNeeded() &&
 		num_pages > 1 && vstate.lastBlockVacuumed < (num_pages - 1))
 	{
 		Buffer		buf;
diff --git a/src/backend/access/rmgrdesc/xlogdesc.c b/src/backend/access/rmgrdesc/xlogdesc.c
index 1b36f9a..4735cfb 100644
--- a/src/backend/access/rmgrdesc/xlogdesc.c
+++ b/src/backend/access/rmgrdesc/xlogdesc.c
@@ -26,7 +26,6 @@
  */
 const struct config_enum_entry wal_level_options[] = {
 	{"minimal", WAL_LEVEL_MINIMAL, false},
-	{"archive", WAL_LEVEL_ARCHIVE, false},
 	{"hot_standby", WAL_LEVEL_HOT_STANDBY, false},
 	{NULL, 0, false}
 };
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 0591f3f..75e87f9 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -520,7 +520,7 @@ AssignTransactionId(TransactionState s)
 	 * recovery only because aborted subtransactions are separately WAL
 	 * logged.
 	 */
-	if (isSubXact && XLogStandbyInfoActive())
+	if (isSubXact && XLogIsNeeded())
 	{
 		unreportedXids[nUnreportedXids] = s->transactionId;
 		nUnreportedXids++;
@@ -969,7 +969,7 @@ RecordTransactionCommit(void)
 	/* Get data needed for commit record */
 	nrels = smgrGetPendingDeletes(true, &rels);
 	nchildren = xactGetCommittedChildren(&children);
-	if (XLogStandbyInfoActive())
+	if (XLogIsNeeded())
 		nmsgs = xactGetCommittedInvalidationMessages(&invalMessages,
 													 &RelcacheInitFileInval);
 	wrote_xlog = (XactLastRecEnd != 0);
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 06f5eb0..61d28e5 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -7994,7 +7994,7 @@ CreateCheckPoint(int flags)
 	 * pointer. This allows us to begin accumulating changes to assemble our
 	 * starting snapshot of locks and transactions.
 	 */
-	if (!shutdown && XLogStandbyInfoActive())
+	if (!shutdown && XLogIsNeeded())
 		checkPoint.oldestActiveXid = GetOldestActiveTransactionId();
 	else
 		checkPoint.oldestActiveXid = InvalidTransactionId;
@@ -8189,7 +8189,7 @@ CreateCheckPoint(int flags)
 	 * If we are shutting down, or Startup process is completing crash
 	 * recovery we don't need to write running xact data.
 	 */
-	if (!shutdown && XLogStandbyInfoActive())
+	if (!shutdown && XLogIsNeeded())
 		LogStandbySnapshot();
 
 	START_CRIT_SECTION();
@@ -8990,7 +8990,7 @@ UpdateFullPageWrites(void)
 	 * Write an XLOG_FPW_CHANGE record. This allows us to keep track of
 	 * full_page_writes during archive recovery, if required.
 	 */
-	if (XLogStandbyInfoActive() && !RecoveryInProgress())
+	if (XLogIsNeeded() && !RecoveryInProgress())
 	{
 		XLogRecData rdata;
 
diff --git a/src/backend/storage/ipc/standby.c b/src/backend/storage/ipc/standby.c
index c704412..6fd8988 100644
--- a/src/backend/storage/ipc/standby.c
+++ b/src/backend/storage/ipc/standby.c
@@ -753,7 +753,7 @@ StandbyReleaseOldLocks(int nxids, TransactionId *xids)
  * --------------------------------------------------------------------
  *		Recovery handling for Rmgr RM_STANDBY_ID
  *
- * These record types will only be created if XLogStandbyInfoActive()
+ * These record types will only be created if XLogIsNeeded()
  * --------------------------------------------------------------------
  */
 
@@ -861,7 +861,7 @@ LogStandbySnapshot(void)
 	xl_standby_lock *locks;
 	int			nlocks;
 
-	Assert(XLogStandbyInfoActive());
+	Assert(XLogIsNeeded());
 
 	/*
 	 * Get details of any AccessExclusiveLocks being held at the moment.
diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c
index f4f32e9..5cc8c0e 100644
--- a/src/backend/storage/lmgr/lock.c
+++ b/src/backend/storage/lmgr/lock.c
@@ -800,7 +800,7 @@ LockAcquireExtended(const LOCKTAG *locktag,
 	if (lockmode >= AccessExclusiveLock &&
 		locktag->locktag_type == LOCKTAG_RELATION &&
 		!RecoveryInProgress() &&
-		XLogStandbyInfoActive())
+		XLogIsNeeded())
 	{
 		LogAccessExclusiveLockPrepare();
 		log_lock = true;
diff --git a/src/bin/pg_controldata/pg_controldata.c b/src/bin/pg_controldata/pg_controldata.c
index fde483a..655b0b5 100644
--- a/src/bin/pg_controldata/pg_controldata.c
+++ b/src/bin/pg_controldata/pg_controldata.c
@@ -73,8 +73,6 @@ wal_level_str(WalLevel wal_level)
 	{
 		case WAL_LEVEL_MINIMAL:
 			return "minimal";
-		case WAL_LEVEL_ARCHIVE:
-			return "archive";
 		case WAL_LEVEL_HOT_STANDBY:
 			return "hot_standby";
 	}
diff --git a/src/include/access/xlog.h b/src/include/access/xlog.h
index 002862c..1a89034 100644
--- a/src/include/access/xlog.h
+++ b/src/include/access/xlog.h
@@ -196,22 +196,18 @@ extern int	num_xloginsert_slots;
 typedef enum WalLevel
 {
 	WAL_LEVEL_MINIMAL = 0,
-	WAL_LEVEL_ARCHIVE,
 	WAL_LEVEL_HOT_STANDBY
 } WalLevel;
 extern int	wal_level;
 
-#define XLogArchivingActive()	(XLogArchiveMode && wal_level >= WAL_LEVEL_ARCHIVE)
+#define XLogArchivingActive()	(XLogArchiveMode && wal_level >= WAL_LEVEL_HOT_STANDBY)
 #define XLogArchiveCommandSet() (XLogArchiveCommand[0] != '\0')
 
 /*
- * Is WAL-logging necessary for archival or log-shipping, or can we skip
- * WAL-logging if we fsync() the data before committing instead?
+ * Is WAL-logging necessary for log-shipping, or can we skip WAL-logging if we
+ * fsync() the data before committing instead?
  */
-#define XLogIsNeeded() (wal_level >= WAL_LEVEL_ARCHIVE)
-
-/* Do we need to WAL-log information required only for Hot Standby? */
-#define XLogStandbyInfoActive() (wal_level >= WAL_LEVEL_HOT_STANDBY)
+#define XLogIsNeeded() (wal_level >= WAL_LEVEL_HOT_STANDBY)
 
 #ifdef WAL_DEBUG
 extern bool XLOG_DEBUG;
#3Robert Haas
robertmhaas@gmail.com
In reply to: Michael Paquier (#2)
Re: Removal of archive in wal_level

On Mon, Nov 4, 2013 at 5:57 AM, Michael Paquier
<michael.paquier@gmail.com> wrote:

Please find attached a patch doing what is written in the $subject.

With the documentation updated, this is even better...

I'm unconvinced that there's any value in this.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#4Peter Eisentraut
peter_e@gmx.net
In reply to: Robert Haas (#3)
Re: Removal of archive in wal_level

On 11/4/13, 8:58 AM, Robert Haas wrote:

On Mon, Nov 4, 2013 at 5:57 AM, Michael Paquier
<michael.paquier@gmail.com> wrote:

Please find attached a patch doing what is written in the $subject.

With the documentation updated, this is even better...

I'm unconvinced that there's any value in this.

Yeah, the only thing this will accomplish is to annoy people who are
actually using that level. It would be more interesting if we could get
rid of the wal_level setting altogether, but of course there are valid
reasons against that.

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#5Stephen Frost
sfrost@snowman.net
In reply to: Peter Eisentraut (#4)
Re: Removal of archive in wal_level

* Peter Eisentraut (peter_e@gmx.net) wrote:

On 11/4/13, 8:58 AM, Robert Haas wrote:

On Mon, Nov 4, 2013 at 5:57 AM, Michael Paquier
<michael.paquier@gmail.com> wrote:

Please find attached a patch doing what is written in the $subject.

With the documentation updated, this is even better...

I'm unconvinced that there's any value in this.

Yeah, the only thing this will accomplish is to annoy people who are
actually using that level. It would be more interesting if we could get
rid of the wal_level setting altogether, but of course there are valid
reasons against that.

It would actually be valuable to 'upgrade' those people to
hot_standby, which is what I had kind of been hoping would happen
eventually. I agree that there's no use for 'archive' today, but rather
than break existing configs that use it, just make 'archive' and
'hot_standby' mean the same thing. In the end, I'd probably vote to
make 'hot_standby' the 'legacy/deprecated' term anyway.

Thanks,

Stephen

#6Robert Haas
robertmhaas@gmail.com
In reply to: Stephen Frost (#5)
Re: Removal of archive in wal_level

On Mon, Nov 4, 2013 at 11:45 AM, Stephen Frost <sfrost@snowman.net> wrote:

* Peter Eisentraut (peter_e@gmx.net) wrote:

On 11/4/13, 8:58 AM, Robert Haas wrote:

On Mon, Nov 4, 2013 at 5:57 AM, Michael Paquier
<michael.paquier@gmail.com> wrote:

Please find attached a patch doing what is written in the $subject.

With the documentation updated, this is even better...

I'm unconvinced that there's any value in this.

Yeah, the only thing this will accomplish is to annoy people who are
actually using that level. It would be more interesting if we could get
rid of the wal_level setting altogether, but of course there are valid
reasons against that.

It would actually be valuable to 'upgrade' those people to
hot_standby, which is what I had kind of been hoping would happen
eventually. I agree that there's no use for 'archive' today, but rather
than break existing configs that use it, just make 'archive' and
'hot_standby' mean the same thing. In the end, I'd probably vote to
make 'hot_standby' the 'legacy/deprecated' term anyway.

That strikes me as a better idea than what the patch actually does,
but I still think it's nanny-ism. I don't believe we have the right
to second-guess the choices our users make in this area. We can make
recommendations in the documentation, but at the end of the day if
users choose to use archive rather than hot_standby, we should respect
that choice, not break it because we think we know better.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers