Re: remove wal_level archive - Mailing list pgsql-hackers

From David Steele
Subject Re: remove wal_level archive
Date
Msg-id 56B8A7F8.2090806@pgmasters.net
Whole thread Raw
In response to Re: remove wal_level archive  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: remove wal_level archive
List pgsql-hackers
On 2/7/16 4:47 PM, Peter Eisentraut wrote:
> On 1/26/16 10:56 AM, Simon Riggs wrote:
>> Removing one of "archive" or "hot standby" will just cause confusion and
>> breakage, so neither is a good choice for removal.
>>
>> What we should do is
>> 1. Map "archive" and "hot_standby" to one level with a new name that
>> indicates that it can be used for both/either backup or replication.
>>       (My suggested name for the new level is "replica"...)
>> 2. Deprecate "archive" and "hot_standby" so that those will be removed
>> in a later release.
>
> Updated patch to reflect these suggestions.

-#define XLogIsNeeded() (wal_level >= WAL_LEVEL_ARCHIVE)
+#define XLogIsNeeded() (wal_level >= WAL_LEVEL_REPLICA)
<...>
-#define XLogStandbyInfoActive() (wal_level >= WAL_LEVEL_HOT_STANDBY)
+#define XLogStandbyInfoActive() (wal_level >= WAL_LEVEL_REPLICA)

Since these are identical now shouldn't one be removed?  I searched the
code and I couldn't find anything that looked dead (i.e. XLogIsNeeded()
&& !XLogStandbyInfoActive()) but it still seems like having both could
cause confusion.

--
-David
david@pgmasters.net


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: process type escape for log_line_prefix
Next
From: Robert Haas
Date:
Subject: Re: Patch: fix lock contention for HASHHDR.mutex