Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rp1H4-004eNw-S4 for pgsql-committers@arkaria.postgresql.org; Tue, 26 Mar 2024 07:31:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rp1H3-00C7KX-HJ for pgsql-committers@arkaria.postgresql.org; Tue, 26 Mar 2024 07:31:10 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rp1Gu-00C6BE-Ue for pgsql-committers@lists.postgresql.org; Tue, 26 Mar 2024 07:31:01 +0000 Received: from fout7-smtp.messagingengine.com ([103.168.172.150]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rp1Gr-006TbJ-QO for pgsql-committers@lists.postgresql.org; Tue, 26 Mar 2024 07:31:00 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfout.nyi.internal (Postfix) with ESMTP id 6B153138013F; Tue, 26 Mar 2024 03:30:58 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 26 Mar 2024 03:30:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm1; t=1711438258; x=1711524658; bh=6JNoR72Q7/ae8KySDSj2kbmbIevXYutZ GJBvYmk760o=; b=uIVDikW4d8hvBAPz0oqoLCNdhp3jcVRZrD2V9gevHy0dtofr EtxB2CU8c9UZRPF8tcEfi2uhPVYPI9EX+7U+vgbtw2IDjYKBCDH2d1zqyPY/IEyV ZStw3rLtkoFzN/v+ow+X2bs/9MfVSAiZ2wpGRxXV3hxcavKP2Wqr9S7LCJmU+6x3 VHzCpx0mRHpidvj59cauzXA41DR+1J+3zQx/CfB69MzQGtmHDzVK3dbb2vuY+dwX MEPPxj0rkvAsWJxmSOT2rT5cxaGVCk5Z1b4K69zaMWLEJxhq8Lk2lyKj/uoVTfgo bFc2UMHK4OrmfL7w6CmLSBb7FNBeR2StngwSpA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1711438258; x= 1711524658; bh=6JNoR72Q7/ae8KySDSj2kbmbIevXYutZGJBvYmk760o=; b=P 1Uet6W0tyq7MoGztOD9w4COf6/4x3Y6Dgq8JXT7G09qhAJbERKB9bYvEaxJWYMs0 1mZJseDJ61F/YRNkZWZi8i8SqSSE305XOnj91Wg2k36DV7hH+u1jIQSBb5ttLDpW 9LCHs7qXa1fAMPM+2iQiKrl6b6AB/nqYGznELJ12mp9G/WYV0HgbFJXU42w8o3rb KlKx+XLilJyZWYlyHRaW85lqTI8JGi5tNxAM/EXhnI+JF60035omgXV54pvL+FZB PTUocEB6/sR0vaG6L23BFZXtGgTQiilB4uPs1VP/UTBiCA2r3dm+WdE4163xv9wR AxDqRTyvFniOvrWmJ0KkQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudduvddguddtlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvvehfhfgjtgfgse htjeertddtvdejnecuhfhrohhmpefrvghtvghrucfgihhsvghnthhrrghuthcuoehpvght vghrsegvihhsvghnthhrrghuthdrohhrgheqnecuggftrfgrthhtvghrnhepgfejtdfhke eftdeugfeileehteeljeeghfeuledthfeutedvffdukeefjefhgeehnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhesvghishgvnh htrhgruhhtrdhorhhg X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 26 Mar 2024 03:30:57 -0400 (EDT) Message-ID: <9609b975-622b-4846-981d-7a5896cd6b51@eisentraut.org> Date: Tue, 26 Mar 2024 08:30:56 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: pgsql: pg_createsubscriber: creates a new logical replica from a standb To: Kyotaro Horiguchi Cc: pgsql-committers@lists.postgresql.org References: <20240326.140116.1116279856046587865.horikyota.ntt@gmail.com> Content-Language: en-US From: Peter Eisentraut In-Reply-To: <20240326.140116.1116279856046587865.horikyota.ntt@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I have committed your patch to tidy this up. Thanks. On 26.03.24 06:01, Kyotaro Horiguchi wrote: > Hello. > > This commit added the following error message: > > pg_createsubscriber.c: 375 >> pg_fatal("could not access directory \"%s\": %s", datadir, >> strerror(errno)); > > Although other messages use %s with PQresultErrorMessage(), regarding > this specific message, shouldn't we use %m instead of %s + strerror()? > I'm not sure if that would be better. > > > pg_createsubscriber.c: 687 >> pg_log_error("could not obtain database OID: got %d rows, expected %d rows", >> PQntuples(res), 1); > pg_createsubscriber.c: 1652 >> pg_log_error("could not obtain subscription OID: got %d rows, expected %d rows", > > In these messages, the second %d is always written as "1 rows", > whereas a similar message correctly uses "1 row". > > pg_createsubscriber.c: 561 >> pg_log_error("could not get system identifier: got %d rows, expected %d row", >> PQntuples(res), 1); > > I think it would be better to change the former instances to "%d row", > or to change both to "1 row". I'd like to go the second way but maybe > we should take the first way following our convention. > > > pg_createsubscriber.c: 923 >> pg_log_error("publisher requires wal_level >= logical"); > > We discussed this message in relation to commit 801792e528, and > decided to quote "logical" to clarify that it is a string literal. I'd > like to follow the conclusion here, too. > > regards. >