Re: Confusing error message with too-large file in pg_basebackup - Mailing list pgsql-bugs

From David Gould
Subject Re: Confusing error message with too-large file in pg_basebackup
Date
Msg-id 20151120171450.024d484d@engels
Whole thread Raw
In response to Re: Confusing error message with too-large file in pg_basebackup  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Confusing error message with too-large file in pg_basebackup
List pgsql-bugs
On Fri, 20 Nov 2015 19:11:23 -0500
Tom Lane <tgl@sss.pgh.pa.us> wrote:

> I'm not sure whether we should treat this as a back-patchable bug fix
> or a new feature for HEAD only.  If we don't back-patch it, there are
> in any case several bugs here that we must fix.  In particular, the
> existing coding in ReceiveTarFile:
>
>     size_t        filesz = 0;
>     ...
>     sscanf(&tarhdr[124], "%11o", (unsigned int *) &filesz);
>
> is utterly, absolutely, completely broken; it'll fail grossly on
> any 64-bit big-endian hardware.  There are other places with misplaced
> faith that "unsigned long" is at least as wide as size_t.
>
> Comments?

My vote would be that it should go in 9.5. If it gets back patched then
some dumps produced by 9.4.x would not be readable by 9.4.x-1. But no 9.5.x
dump is broken by changing it now.

-dg

--
David Gould              510 282 0869         daveg@sonic.net
If simplicity worked, the world would be overrun with insects.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Confusing error message with too-large file in pg_basebackup
Next
From: Tom Lane
Date:
Subject: Re: Confusing error message with too-large file in pg_basebackup