Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pm4Hd-00035f-Nk for pgsql-committers@arkaria.postgresql.org; Tue, 11 Apr 2023 03:03:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pm4Hc-0007dP-ME for pgsql-committers@arkaria.postgresql.org; Tue, 11 Apr 2023 03:03:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pm4Hc-0007dF-FM for pgsql-committers@lists.postgresql.org; Tue, 11 Apr 2023 03:03:00 +0000 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1pm4HZ-0029CS-WE for pgsql-committers@lists.postgresql.org; Tue, 11 Apr 2023 03:02:59 +0000 Received: by mail-pl1-x631.google.com with SMTP id m18so6456067plx.5 for ; Mon, 10 Apr 2023 20:02:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1681182176; x=1683774176; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:from:subject:cc:to:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=4ZchgtK464S+3N4NsWJ5EDExzCNt9ac/QAxX+7I4vRs=; b=enXNOR4JPMtPU17lUZCoFDf0jc2L69yWXvxrHzB6wmlGQyDTg9KSqJzNze8vUf4WHQ jTOk8+lNHrwAcn5lJirNQAoDtqjlRfeN0686gLXsOj0+YracZASVWZoaPAY/RkchDWVC Go9oepm+ef+nG2e5fMCS63xIQ/EPRq+1e9SnWj0r6OPTzfBaJ1ZmkxsIXV1ekJF2iL4V 6tkxQD4u6cZJ0rSw3+ZxkRpAhmZDXPc2/OMemv5vLSOQQXuhpjQhNj37rye8RHMlfybp 5pSutCqa8w3dEGJLVBOS95c/51mk3C6kmzaXn3ivNLniL/MOI25rjdlCYsAp4X2P4aTR eS7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681182176; x=1683774176; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:from:subject:cc:to:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=4ZchgtK464S+3N4NsWJ5EDExzCNt9ac/QAxX+7I4vRs=; b=QagooTdSE6TD2ZPAr2age7NCXKp1yfWfs4EtMITBO52QYr0rI0qQo7CSp9zo0emlkT 7pTBmhIg/NKLgY5mFN/bX9a0tpu99qKOvt0ir+E+WzKRerAdA2i7c3R5vWE5ps6nndbb V2eXvouUXy4caVupVKFh1AwDFthtMII7e5dVHv5r7eeVr0N2K9YkV3OyGIndOdTHvOzz WwYgu98vtjN7sbKdJksUtpw4UHkN8frxCnmcizd5XY7ptJ/ct527i7hTchY8DC3LP2+x RSKdVvhY40i3RhzUc/opPP8hQqsDGTDZXjoIaAMg5wKeK95T6bdWEoxmpcqIQYUmQ+8S RLNg== X-Gm-Message-State: AAQBX9fOz+GvPsT17obF0smav4s3t/EMY5WvDcbLDAzabkqJ2HNyPPM5 cyTGLL2gJ5a9PQKE7WZGZvbIU0gbXWM= X-Google-Smtp-Source: AKy350bkkbc/Zujn606vd8kaH6Vw6leJvGDFKUx9Ok5D9KSoAKLmwFLFH+NVAYLtR00SZAcoyiMdfg== X-Received: by 2002:a17:90b:1b4e:b0:237:50b6:9838 with SMTP id nv14-20020a17090b1b4e00b0023750b69838mr16600718pjb.45.1681182176068; Mon, 10 Apr 2023 20:02:56 -0700 (PDT) Received: from localhost (KD036014041111.ppp-bb.dion.ne.jp. [36.14.41.111]) by smtp.gmail.com with ESMTPSA id k9-20020a634b49000000b00502ecb91940sm7674578pgl.55.2023.04.10.20.02.54 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 10 Apr 2023 20:02:55 -0700 (PDT) Date: Tue, 11 Apr 2023 12:02:53 +0900 (JST) Message-Id: <20230411.120253.579856734111967616.horikyota.ntt@gmail.com> To: andres@anarazel.de Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Allow logical decoding on standbys From: Kyotaro Horiguchi In-Reply-To: References: User-Agent: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > 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 the primary 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