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.96) (envelope-from ) id 1wQzs8-0022Zs-3D for pgsql-hackers@arkaria.postgresql.org; Sun, 24 May 2026 03:51:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wQzs4-00GPla-2H for pgsql-hackers@arkaria.postgresql.org; Sun, 24 May 2026 03:51:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wQzs3-00GPlS-2x for pgsql-hackers@lists.postgresql.org; Sun, 24 May 2026 03:51:25 +0000 Received: from fout-b1-smtp.messagingengine.com ([202.12.124.144]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wQzs0-000000018h4-1MzI for pgsql-hackers@lists.postgresql.org; Sun, 24 May 2026 03:51:24 +0000 Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfout.stl.internal (Postfix) with ESMTP id EF5B41D0006E; Sat, 23 May 2026 23:51:16 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Sat, 23 May 2026 23:51:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm2; t=1779594676; x= 1779681076; bh=TbHkjyGjQFAkl65vhMePHdoQcKeGa9wNj+o4Pzp+A5U=; b=m q2gOx60j6zY3frwAgBHIsdsgMKED15RLArS4nPK9+fPREEPOHYc4Y3D00FIk1GvX /7B0b1etv7aKlB2mfLYoGi3OLBEC2v9SrvuFK0zIrY8/oZ/EIMu6AQWW8W/3kNnJ k3ZyYsWCAkKVBrw81RKoC481zWn4VaAnZz/6ZaNh3L7H+lg4MK06fQCN1MR5M1fu zZbsV5COgsmUwsMT8OwK64gACytZkjLgOzfdNCVygMNoOIElZOOgbVGZRNRX1iGH 5WiaukaOUPlpaI5dyDOwVJ2USK8mqI/OjpaqOKc59FBmdab+jnAK7irlxtYazPIx 8xj9p/aYhJOhseY/iTDwA== 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 :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1779594676; x=1779681076; bh=T bHkjyGjQFAkl65vhMePHdoQcKeGa9wNj+o4Pzp+A5U=; b=d0Lu78QqbD7H4RP9E 1tbjKekCuW1aUpELTAaOaGLlcU22xC46b4KTeQiFykB7Kk0frAi64J2Q6lzYZXdK w3G6rcmVz+sVUqdLk++JIEk/Oj17/nUXiMPbim0a8MSQ0Dc8iWPNEjf7Lhx/oV2B KZc+09YtSvx9WLms0OWMgRgKmlrm2daTiWmVko1fZkuxMcFEYNRc7VGvNsbD+OPL u1qEhRLHiJQJmSvqwac8rZPK+O08gkEzm4AGDA2REF5EI3V63GO+v+rTp+ot89T3 agnD0gLjRj1Vjp1FjpH8bI2s7jeQ+iV7frORFmL7C3ArORoY6jRvOl5Ke0L53L8K bLUyQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdduheegleduucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheplmhlvhgrrhho ucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsehkuhhrihhlvghmuhdruggvqeenucggtf frrghtthgvrhhnpeejteevhedutdfhgeekveeiudduhfegtdeugeeggffgleduhfettdef feettdejleenucffohhmrghinhepkhhovhhiughgohihrghlrdhnvghtpdgvnhhtvghrph hrihhsvggusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpegrlhhvhhgvrhhrvgeskhhurhhilhgvmhhurdguvgdpnhgspghrtghpth htohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepjhhonhgrthhhrghnrdgr sgguihgvlhesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrh hssehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 23 May 2026 23:51:13 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1779594648; bh=pX6nMJLGhpz+P0TQFmJznQInyvmx69xXbaoIeLUM8FE=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=9ULkwpGz+NirQMJnoLk6YWoVxVjg60C37CKYSpYrUVt95+Q9ho3L7MjKAZb5BAWgs Shdj26DZhZTWxI40NWapTfCQf3x7oooUgBeXwc4/GHxXapt5ENVrL2Ehs9j5GQBvMr EZt35B2G0Zsg41ykcxIsfRCXcodrOXTlkW8bHEwjAxDS3/9VMVI93GXFcE/E+Q08Qm hvjh1tNlh8U8bp/GnAAB3tC7T5w1oEKX1Memlhl6SpDM9BVZPj+zRqfxuNe+uid6bP x6MlLaGkMCPLSo1vPy2b0Bs4Su5uxX8NlpT6qtq/6bH4b3Z5vcZlcP1CnGY0oHEUBl SAiJ92x0p7+lw== Received: by ida.kurilemu.internal (Postfix, from userid 1000) id 25B83B042EB; Sat, 23 May 2026 20:50:48 -0700 (PDT) Date: Sat, 23 May 2026 20:50:48 -0700 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: "Jonathan Gonzalez V." Cc: Pg Hackers Subject: Re: splitting pg_resetwal output strings Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2026-May-23, Jonathan Gonzalez V. wrote: > Hello! > > I've tested the patch, and I found that in the first patch, the nsl.mk > file is changed to match the first argument of CONTROLDATA_LINE as the > string to match: [...] > While keeping the argument as it is, I suggest to switch to > CONTROLDATA_LINE:2 like this: Yeah, you're correct, this is a bug in 0002. Thanks! > During testing, I found a couple of things that may be interesting, or > at least worth keeping in mind for the future implementation already > mentioned [1]. > > Even if the spacing calculation is correct, I found that the font size > is not the same for different languages, so if a strings or part of it, > is translated into, for example, Hindi, and most of it it's in English, > it will affect how it look in the terminal, meaning that it's probably > that a the second column will be moved to the left generating a > misalignment in the printed data I don't think varying font width is something we should care about. The multibyte system has a mechanism to tell us how wide the characters are, in units of some monospace font. This is what the pg_wcswidth calls are there for (or internal_wcslength in the patch). If the terminal doesn't align the characters correctly according to the declared width because different fonts are used, that's not our bug. The idea behind the patch is to measure the length of all strings after translation. If a number of the strings are not translated, then we still measure them in their final presentation form. Then we align the two columns based on the maximum length of all strings. I don't think this is any worse than what you get with the original code; if a translator has chosen a different alignment than what English has, and some strings are not translated, then the output will appear misaligned. In fact, with the code it will be better (assuming no font issues), because we will try to align correctly even the strings that aren't translated. In fact, if fonts differ, there's nothing the translator can do, because there's no way to know what's the user going to do at runtime -- users are going to have different terminals and different fonts. > [2] https://sw.kovidgoyal.net/kitty/ Hmm, I'm not sure what you wanted to show with this URL -- can you elaborate? -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/