pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Amul Sul <sulamul@gmail.com>
Cc: Sravan Kumar <sravanvcybage@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: pg_verifybackup: TAR format backup verification
Date: Mon, 30 Sep 2024 18:01:11 -0400
Message-ID: <1636465.1727733671@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmoYAUxW4GzEK4puDtA_HNaWPJxfmgqQX8oDkRM3krGJuUg@mail.gmail.com>
References: <CAAJ_b94StvLWrc_p4q-f7n3OPfr6GhL8_XuAg2aAaYZp1tF-nw@mail.gmail.com>
	<CA+=NbjjkFADANQoyvgTQfKH8ZerxpmsJD70R17V8ZtfaoyRYwg@mail.gmail.com>
	<CAAJ_b96xU5fOOvWhJyMvvDCirJEZZdjieZZbyf0PnYukFQCy+Q@mail.gmail.com>
	<CA+Tgmoa0FVRbC9EG5GDaXORqMsoj8AnEDV4FVXwbLENKqwQqaA@mail.gmail.com>
	<CAAJ_b96Gwh=6zwpqsD-sVNOeYcU=9rfBygVtuXmU3qFAiNr2Hw@mail.gmail.com>
	<CA+Tgmobmi7qiu8HDQECwuy-JrAH0zcYbzGnhnKjurqv44DHtxg@mail.gmail.com>
	<CAAJ_b94sxUN73kNZ_Z5sP0GDEZGAxKgW0PvS5CBJXiH212+Fww@mail.gmail.com>
	<CA+Tgmoboyugvh0C-QWfzQK0nNgOHrxGnQQiOROjaa--+Aqr2xg@mail.gmail.com>
	<CAAJ_b975Pyo53P-zvkTPjVFErEANuRP9+K=2Qnifiy6BJBtwfw@mail.gmail.com>
	<CA+Tgmobt6=v-jE4iJ2kBGQ=jfubX_7fdOe4Uf9TWhKn+cfjGfw@mail.gmail.com>
	<CAAJ_b95rXAsyuetre9Wc-W6uHW-=ivVj56F8-w4gfrTGsnRRSA@mail.gmail.com>
	<CA+TgmoZw9dc6w-FFFJvuFMEfB11c+tDRyW+BjWD89+NG8bV=iA@mail.gmail.com>
	<CAAJ_b95mcGjkfAf1qduOR97CokW8-_i-dWLm3v6x1w2-OW9M+A@mail.gmail.com>
	<CA+TgmoZTJzUyzDkdo6K7TTM2ePP0EMXTwxGhJN1Ymx3qNHvevQ@mail.gmail.com>
	<CA+TgmoZnG! 5DT1jo=9xgFztiLX4tU7+wr3D9HbhH_vPc+C5M0iA@mail.gmail.com>
	<CA+TgmoYkXG1mvc4kc=fid8Sn-k4M1a4T_m4nN1_1Ed9afKg2KQ@mail.gmail.com>
	<CAAJ_b95e9oNpQ+EdLgKX+aLJXwpWAy2EZsLBFSB9=XSPs4hhFg@mail.gmail.com>
	<CAAJ_b972EmWT+a63wtTAwfGF3QpYZkzwov5UPh=JPmgJY=dW8A@mail.gmail.com>
	<CA+TgmobUiaquaz7CTzDDpJu5e6XYuvxEc4e+HXEvUqn7PD4byw@mail.gmail.com>
	<CAAJ_b976LwbmzJLDLTw6ScAVbH7mtxWhj12MWtyRYSkCSjOcfw@mail.gmail.com>
	<CA+TgmoZ-fwQ0aWUs_40oXkEpF7JAn4D9SnKj8dj=qGLtO0VSRw@mail.gmail.com>
	<CA+Tgmobs-gbRUMGPpzVZnPPP=cgeEO7hnzV2yKmM0BQ=MGQSMg@mail.gmail.com>
	<CAAJ_b955y7NrkTUGtiyoGkPBs-OgYMv32iW0WTSpVfpFpezxdQ@mail.gmail.com>
	<CA+Tgmob3zhdDM=ggw-NrV-jrvLP7a-otWFn5F+5oOputiFdhmQ@mail.gmail.com>
	<CAAJ_b96RBwBMkgK3gzzm+94m6jvdbMi--8RzxaQLu-2+52Nj6g@mail.gmail.com>
	<CA+TgmoZBPKaonc=rE0d7YUm3fzeQTftP6o=8vqFDe1AY2nmbrw@mail.gmail.com>
	<1115881.1727564342@sss.pgh.pa.us>
	<CA+TgmoYHyUxkTW4CdwpdVsB4V-Mq+YWs7FwEsuSJq057+fSVoQ@mail.gmail.com>
	<1466068.1727709896@sss.pgh.pa.us>
	<CA+TgmoYAUxW4GzEK4puDtA_HNaWPJx! fmgqQX8oDkRM3krGJuUg@mail.gmail.com>

Robert Haas <robertmhaas@gmail.com> writes:
> On Mon, Sep 30, 2024 at 11:24 AM Tom Lane <tgl@sss.pgh.pa.us> 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





view thread (51+ messages)  latest in thread

Message-ID: <1636465.1727733671@sss.pgh.pa.us>
Permalink:  ../1636465.1727733671@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1636465.1727733671@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, sulamul@gmail.com, sravanvcybage@gmail.com
  Subject: Re: pg_verifybackup: TAR format backup verification
  In-Reply-To: <1636465.1727733671@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox