Re: [HACKERS] Correction for replication slot creation error message in 9.6
On 05/04/16 10:24, Peter Eisentraut wrote: > On 03/30/2016 09:15 PM, Ian Barwick wrote: >> Currently pg_create_physical_replication_slot() may refer to >> the deprecated wal_level setting "archive": > > I have fixed this in the most direct way, since there was some disagreement > about rewording. Thanks! Regards Ian Barwick -- Ian Barwick http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Correction for replication slot creation error message in 9.6
On 03/31/2016 10:18 AM, Alvaro Herrera wrote: I thought we had agreed that we weren't going to consider the wal_level values as a linear scale -- in other words, wordings such as "greater than FOO" are discouraged. That's always seemed a bit odd to me. I don't think there was any agreement about that. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Correction for replication slot creation error message in 9.6
On 03/30/2016 09:15 PM, Ian Barwick wrote: Currently pg_create_physical_replication_slot() may refer to the deprecated wal_level setting "archive": I have fixed this in the most direct way, since there was some disagreement about rewording. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Correction for replication slot creation error message in 9.6
On 16/04/01 8:15, Michael Paquier wrote: > On Thu, Mar 31, 2016 at 11:18 PM, Alvaro Herrera > wrote: >> Andres Freund wrote: >>> On 2016-03-31 10:15:21 +0900, Ian Barwick wrote: >> Patch changes the error message to: ERROR: replication slots can only be used if wal_level is "replica" or "logical" Explicitly naming the valid WAL levels matches the wording in the wal_level error hint used in a couple of places, i.e. >>> >>> The explicit naming makes it much more verbose to change anything around >>> wal level though, so consider me not a fan of spelling out all levels. >> >> I thought we had agreed that we weren't going to consider the wal_level >> values as a linear scale -- in other words, wordings such as "greater >> than FOO" are discouraged. That's always seemed a bit odd to me. > > Yes, that's what I thought as well. I don't remember if I saw that particular discussion, but same here. I suppose the alternative would be something like this: ERROR: replication slots cannot be used if wal_level is "minimal" (providing it remains the only "sub-replica" WAL level ;) ). Regards Ian Barwick -- Ian Barwick http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, RemoteDBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Correction for replication slot creation error message in 9.6
On Thu, Mar 31, 2016 at 11:18 PM, Alvaro Herrera wrote: > Andres Freund wrote: >> On 2016-03-31 10:15:21 +0900, Ian Barwick wrote: > >> > Patch changes the error message to: >> > >> > ERROR: replication slots can only be used if wal_level is "replica" or >> > "logical" >> > >> > Explicitly naming the valid WAL levels matches the wording in the wal_level >> > error hint used in a couple of places, i.e. >> >> The explicit naming makes it much more verbose to change anything around >> wal level though, so consider me not a fan of spelling out all levels. > > I thought we had agreed that we weren't going to consider the wal_level > values as a linear scale -- in other words, wordings such as "greater > than FOO" are discouraged. That's always seemed a bit odd to me. Yes, that's what I thought as well. -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Correction for replication slot creation error message in 9.6
Andres Freund wrote: > On 2016-03-31 10:15:21 +0900, Ian Barwick wrote: > > Patch changes the error message to: > > > > ERROR: replication slots can only be used if wal_level is "replica" or > > "logical" > > > > Explicitly naming the valid WAL levels matches the wording in the wal_level > > error hint used in a couple of places, i.e. > > The explicit naming makes it much more verbose to change anything around > wal level though, so consider me not a fan of spelling out all levels. I thought we had agreed that we weren't going to consider the wal_level values as a linear scale -- in other words, wordings such as "greater than FOO" are discouraged. That's always seemed a bit odd to me. -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Correction for replication slot creation error message in 9.6
On 2016-03-31 10:15:21 +0900, Ian Barwick wrote: > Hi > > Currently pg_create_physical_replication_slot() may refer to > the deprecated wal_level setting "archive": > > postgres=# SHOW wal_level ; >wal_level > --- >minimal > (1 row) > > postgres=# SELECT pg_create_physical_replication_slot('some_slot'); > ERROR: replication slots can only be used if wal_level is >= archive > > Patch changes the error message to: > > ERROR: replication slots can only be used if wal_level is "replica" or > "logical" > > Explicitly naming the valid WAL levels matches the wording in the wal_level > error hint used in a couple of places, i.e. The explicit naming makes it much more verbose to change anything around wal level though, so consider me not a fan of spelling out all levels. Greetings, Andres Freund -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Correction for replication slot creation error message in 9.6
On Thu, Mar 31, 2016 at 10:15 AM, Ian Barwick wrote: > Currently pg_create_physical_replication_slot() may refer to > the deprecated wal_level setting "archive": (Adding Peter in CC who committed this patch). > Patch changes the error message to: > > ERROR: replication slots can only be used if wal_level is "replica" or > "logical" Sounds right to me. > Explicitly naming the valid WAL levels matches the wording in the wal_level > error hint used in a couple of places, i.e. > > "wal_level must be set to "replica" or "logical" at server start." It is worth telling that Peter and I both had this code in front of our eyes during the review :) Still we missed that. -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
[HACKERS] Correction for replication slot creation error message in 9.6
Hi Currently pg_create_physical_replication_slot() may refer to the deprecated wal_level setting "archive": postgres=# SHOW wal_level ; wal_level --- minimal (1 row) postgres=# SELECT pg_create_physical_replication_slot('some_slot'); ERROR: replication slots can only be used if wal_level is >= archive Patch changes the error message to: ERROR: replication slots can only be used if wal_level is "replica" or "logical" Explicitly naming the valid WAL levels matches the wording in the wal_level error hint used in a couple of places, i.e. "wal_level must be set to "replica" or "logical" at server start." Regards Ian Barwick -- Ian Barwick http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services diff --git a/src/backend/replication/slot.c b/src/backend/replication/slot.c new file mode 100644 index c13be75..82f6e65 *** a/src/backend/replication/slot.c --- b/src/backend/replication/slot.c *** CheckSlotRequirements(void) *** 763,769 if (wal_level < WAL_LEVEL_REPLICA) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), ! errmsg("replication slots can only be used if wal_level >= archive"))); } /* --- 763,769 if (wal_level < WAL_LEVEL_REPLICA) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), ! errmsg("replication slots can only be used if wal_level is \"replica\" or \"logical\""))); } /* -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers