Re: pgsql: Allow logical decoding on standbys

Поиск
Список
Период
Сортировка
От Kyotaro Horiguchi
Тема Re: pgsql: Allow logical decoding on standbys
Дата
Msg-id 20230411.120253.579856734111967616.horikyota.ntt@gmail.com
обсуждение исходный текст
Ответ на pgsql: Allow logical decoding on standbys  (Andres Freund <andres@anarazel.de>)
Ответы Re: pgsql: Allow logical decoding on standbys  ("Drouvot, Bertrand" <bdrouvot@amazon.com>)
Re: pgsql: Allow logical decoding on standbys  (Andres Freund <andres@anarazel.de>)
Список pgsql-committers
> Allow logical decoding on standbys

This adds the following error message.

+    errmsg("logical decoding on a standby requires wal_level to be at least logical on the primary")));

We alredy have a nearly identical message as follows.

> errmsg("logical decoding requires wal_level >= logical")));

And we used to writte this kind of conditions, like "wal_level >=
logical", using a mathematical operator. Don't we need to unify them?

And, a nearby commit addds the following message.

+            appendStringInfo(&err_detail, _("Logical decoding on standby requires wal_level to be at least logical on
theprimary server"));
 

This is omitting the indefinite article before "standby". I'm not sure
what to do about it but feel like we don't need it here.

diff --git a/src/backend/replication/logical/decode.c b/src/backend/replication/logical/decode.c
index 5508cc2177..beef399b42 100644
--- a/src/backend/replication/logical/decode.c
+++ b/src/backend/replication/logical/decode.c
@@ -177,7 +177,7 @@ xlog_decode(LogicalDecodingContext *ctx, XLogRecordBuffer *buf)
                     Assert(RecoveryInProgress());
                     ereport(ERROR,
                             (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
-                             errmsg("logical decoding on a standby requires wal_level to be at least logical on the
primary")));
+                             errmsg("logical decoding on standby requires wal_level >= logical on the primary")));
                 }
                 break;
             }
diff --git a/src/backend/replication/logical/logical.c b/src/backend/replication/logical/logical.c
index 82dae95080..7e1f677f7a 100644
--- a/src/backend/replication/logical/logical.c
+++ b/src/backend/replication/logical/logical.c
@@ -137,7 +137,7 @@ CheckLogicalDecodingRequirements(void)
         if (GetActiveWalLevelOnStandby() < WAL_LEVEL_LOGICAL)
             ereport(ERROR,
                     (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
-                     errmsg("logical decoding on a standby requires wal_level to be at least logical on the
primary")));
+                     errmsg("logical decoding on standby requires wal_level >= logical on the primary")));
     }
 }
 


regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



В списке pgsql-committers по дате отправления:

Предыдущее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: pgsql: Add VACUUM/ANALYZE BUFFER_USAGE_LIMIT option
Следующее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: pgsql: Support invalidating replication slots due to horizon and wal_le