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 1oQ8We-0004lm-5N for pgsql-committers@arkaria.postgresql.org; Mon, 22 Aug 2022 14:35:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oQ8Wc-000591-8U for pgsql-committers@arkaria.postgresql.org; Mon, 22 Aug 2022 14:35:34 +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 1oQ8Wc-00058s-0M for pgsql-committers@lists.postgresql.org; Mon, 22 Aug 2022 14:35:34 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oQ8WZ-0001uc-Dh for pgsql-committers@lists.postgresql.org; Mon, 22 Aug 2022 14:35:33 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 6831D5C0143; Mon, 22 Aug 2022 10:35:29 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 22 Aug 2022 10:35:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1661178929; x= 1661265329; bh=Ug+7DV9s05QBci5p7AeSX7AINS81ja0ADDoikZ3hHgw=; b=1 VajQbDIxZgVv6gRGKra8OaVYSs8yTZptmfdHPZWI4WUJ6f6blRxQPIE39OMiRgWN I38YwNXvfvYEXWBBnBUGagJoncJQx60c1sUauNg1wEiqM5QPzjqjRY5Nd2IuGz9d n0lN5yQsQP5AFBdgrCa249pbJ6VxS+eXU1EVWxWPAvtAvIto/dpPmgBJjmAc5ERJ HnYO7pngLTO3rl2OoyzHYb6p+6FWe4HHcgFUPLn3QmnbYx5LKQIiCoNPPc8wwmy3 DxcFV2ssrSL8RnOO5A4+GIxRTAbes+oeg9v0p1cDi53QEjMVuzOLNNmYwFEJBFC0 y4s2mgq2HKJ82uQIuYKhA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdeijedgjeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvghnth gvrhhprhhishgvuggsrdgtohhmqeenucggtffrrghtthgvrhhnpeehleffgeegudejteei hfelteduvdeifffhffdvjedvffegjeekudeludehudeifeenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrrdgvihhsvghnthhrrghu thesvghnthgvrhhprhhishgvuggsrdgtohhm X-ME-Proxy: Feedback-ID: i131946ab:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 22 Aug 2022 10:35:28 -0400 (EDT) Message-ID: <31e63649-0355-7088-831e-b07d5f908a8c@enterprisedb.com> Date: Mon, 22 Aug 2022 16:35:27 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: pgsql: Refer to replication origin roident as "ID" in user facing messa Content-Language: en-US To: John Naylor Cc: John Naylor , pgsql-committers@lists.postgresql.org References: From: Peter Eisentraut In-Reply-To: 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 On 19.08.22 03:06, John Naylor wrote: > On Thu, Aug 18, 2022 at 4:49 PM Peter Eisentraut > wrote: >> >> On 18.08.22 04:10, John Naylor wrote: >>> While at it, most format strings already use %u, so for consintency >>> change the remaining stragglers using %d. >> >> This is incorrect. Replication origin IDs are of type uint16, which >> gets promoted to int in a variable arguments list, so %d is the correct >> placeholder. > > I would think that for uint16, either %d or %u would have the same > result. Is there some other consideration I'm not aware of? Every once in a while, I build PostgreSQL with -Wformat-signedness, which often finds issues with OIDs and timeline IDs printed with the wrong placeholder. There is a lot of noise to skip past when doing that, but in the long run it would be nice if we didn't add more of it.