Re: Confusing error message with too-large file in pg_basebackup

From: David Gould <daveg(at)sonic(dot)net>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Confusing error message with too-large file in pg_basebackup
Date: 2015-11-21 01:14:50
Message-ID: 20151120171450.024d484d@engels
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, 20 Nov 2015 19:11:23 -0500
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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(at)sonic(dot)net
If simplicity worked, the world would be overrun with insects.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2015-11-21 01:54:50 Re: Confusing error message with too-large file in pg_basebackup
Previous Message 許耀彰 2015-11-21 00:55:34 Re: [BUGS] postgresql downgrade issue