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 1svOSD-00EhJZ-8f for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Sep 2024 22:01:17 +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 1svOSC-006Nqy-64 for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Sep 2024 22:01:16 +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 1svOSB-006Not-OL for pgsql-hackers@lists.postgresql.org; Mon, 30 Sep 2024 22:01:15 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1svOS9-001r4w-B7 for pgsql-hackers@postgresql.org; Mon, 30 Sep 2024 22:01:14 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 48UM1BhD1636466; Mon, 30 Sep 2024 18:01:11 -0400 From: Tom Lane To: Robert Haas cc: Amul Sul , Sravan Kumar , PostgreSQL-development Subject: Re: pg_verifybackup: TAR format backup verification In-reply-to: References: <1115881.1727564342@sss.pgh.pa.us> <1466068.1727709896@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Mon, 30 Sep 2024 16:05:01 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <1636464.1727733671.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Mon, 30 Sep 2024 18:01:11 -0400 Message-ID: <1636465.1727733671@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Robert Haas writes: > On Mon, Sep 30, 2024 at 11:24 AM Tom Lane wrote: >> Um, wait ... we do have strtou64(), so you should use that. > The thing we should be worried about is not how large a JSON blob > might be, but rather how large any file that appears in the data > directory might be. So uint32 is out; and I think I hear you voting > for uint64 over size_t. Yes. size_t might only be 32 bits. > But then how do you think we should print > that? Cast to unsigned long long and use %llu? Our two standard solutions are to do that or to use UINT64_FORMAT. But UINT64_FORMAT is problematic in translatable strings because then the .po files would become platform-specific, so long long is what to use in that case. For a non-translated format string you can do either. > I don't understand what you think the widely-used, better solution is > here. What we just said above. regards, tom lane