Re: [HACKERS] [GENERAL] pg_upgrade from 9.5 to 9.6 fails with "invalid argument"

2016-10-02 Thread Andrew Dunstan
On 10/01/2016 02:01 PM, Tom Lane wrote: Andrew Dunstan writes: On 09/30/2016 12:24 PM, Tom Lane wrote: Seems to be some additional prep work needed somewhere ... No upgrade_install_root at /home/bfarm/bf-scripts/build-farm-4.17/PGBuild/Modules/TestUpgradeXversion.pm

Re: [HACKERS] [GENERAL] pg_upgrade from 9.5 to 9.6 fails with "invalid argument"

2016-10-01 Thread Tom Lane
Andrew Dunstan writes: > On 09/30/2016 12:24 PM, Tom Lane wrote: >> Seems to be some additional prep work needed somewhere ... >> No upgrade_install_root at >> /home/bfarm/bf-scripts/build-farm-4.17/PGBuild/Modules/TestUpgradeXversion.pm >> line 51. > Oh sorry, you also

Re: [HACKERS] [GENERAL] pg_upgrade from 9.5 to 9.6 fails with "invalid argument"

2016-09-30 Thread Andrew Dunstan
On 09/30/2016 12:24 PM, Tom Lane wrote: Andrew Dunstan writes: On 09/30/2016 10:25 AM, Tom Lane wrote: Oh! How would I enable or use that? 1. Pull the latest version of the module from git. 2. enable it in your buildfarm config file 3. do "run_branches.pl --run-all

Re: [HACKERS] [GENERAL] pg_upgrade from 9.5 to 9.6 fails with "invalid argument"

2016-09-30 Thread Tom Lane
Masahiko Sawada writes: > +#ifndef WIN32 > if ((src_fd = open(fromfile, O_RDONLY, 0)) < 0) > +#else > + if ((src_fd = open(fromfile, O_RDONLY | O_BINARY)) < 0) > +#endif This is easier with PG_BINARY. Also, both open() calls need this. I'm rather inclined to

Re: [HACKERS] [GENERAL] pg_upgrade from 9.5 to 9.6 fails with "invalid argument"

2016-09-30 Thread Masahiko Sawada
On Fri, Sep 30, 2016 at 2:40 PM, Masahiko Sawada wrote: > On Fri, Sep 30, 2016 at 1:26 PM, Kyotaro HORIGUCHI > wrote: >> Hello, >> >> At Fri, 30 Sep 2016 13:11:21 +0900, Masahiko Sawada >> wrote in

Re: [HACKERS] [GENERAL] pg_upgrade from 9.5 to 9.6 fails with "invalid argument"

2016-09-30 Thread Tom Lane
Andrew Dunstan writes: > On 09/30/2016 10:25 AM, Tom Lane wrote: >> Oh! How would I enable or use that? > 1. Pull the latest version of the module from git. > 2. enable it in your buildfarm config file > 3. do "run_branches.pl --run-all --verbose --test" and watch the

Re: [HACKERS] [GENERAL] pg_upgrade from 9.5 to 9.6 fails with "invalid argument"

2016-09-30 Thread Andrew Dunstan
On 09/30/2016 10:25 AM, Tom Lane wrote: Andrew Dunstan writes: On 09/29/2016 05:48 PM, Tom Lane wrote: We might've caught these things earlier if the buildfarm testing included cross-version upgrades, but of course that requires a lot of test infrastructure that's not

Re: [HACKERS] [GENERAL] pg_upgrade from 9.5 to 9.6 fails with "invalid argument"

2016-09-30 Thread Tom Lane
Andrew Dunstan writes: > On 09/29/2016 05:48 PM, Tom Lane wrote: >> We might've caught these things earlier if the buildfarm testing >> included cross-version upgrades, but of course that requires a >> lot of test infrastructure that's not there ... > I have done quite a bit

Re: [HACKERS] [GENERAL] pg_upgrade from 9.5 to 9.6 fails with "invalid argument"

2016-09-30 Thread Andrew Dunstan
On 09/29/2016 05:48 PM, Tom Lane wrote: We might've caught these things earlier if the buildfarm testing included cross-version upgrades, but of course that requires a lot of test infrastructure that's not there ... I have done quite a bit of work on this - see

Re: [HACKERS] [GENERAL] pg_upgrade from 9.5 to 9.6 fails with "invalid argument"

2016-09-30 Thread Masahiko Sawada
On Fri, Sep 30, 2016 at 6:40 PM, Thomas Kellerer wrote: > Tom Lane schrieb am 29.09.2016 um 23:10: >> Thomas Kellerer writes: >>> for some reason pg_upgrade failed on Windows 10 for me, with an error >>> message that one specifc _vm file couldn't be

Re: [HACKERS] [GENERAL] pg_upgrade from 9.5 to 9.6 fails with "invalid argument"

2016-09-29 Thread Masahiko Sawada
On Fri, Sep 30, 2016 at 1:26 PM, Kyotaro HORIGUCHI wrote: > Hello, > > At Fri, 30 Sep 2016 13:11:21 +0900, Masahiko Sawada > wrote in

Re: [HACKERS] [GENERAL] pg_upgrade from 9.5 to 9.6 fails with "invalid argument"

2016-09-29 Thread Kyotaro HORIGUCHI
Hello, At Fri, 30 Sep 2016 13:11:21 +0900, Masahiko Sawada wrote in

Re: [HACKERS] [GENERAL] pg_upgrade from 9.5 to 9.6 fails with "invalid argument"

2016-09-29 Thread Masahiko Sawada
On Fri, Sep 30, 2016 at 7:08 AM, Tom Lane wrote: > Alvaro Herrera writes: >> Tom Lane wrote: >>> I wouldn't even put a lot of faith in the errno being meaningful, >>> considering that it does close() calls before capturing the errno. > >> So we do

Re: [HACKERS] [GENERAL] pg_upgrade from 9.5 to 9.6 fails with "invalid argument"

2016-09-29 Thread Tom Lane
Alvaro Herrera writes: > Tom Lane wrote: >> I wouldn't even put a lot of faith in the errno being meaningful, >> considering that it does close() calls before capturing the errno. > So we do close() in a bunch of places while closing shop, which calls > _close() on

Re: [HACKERS] [GENERAL] pg_upgrade from 9.5 to 9.6 fails with "invalid argument"

2016-09-29 Thread Tom Lane
Alvaro Herrera writes: > Moreover I think getErrorText() as a whole is misconceived and should be > removed altogether (why pstrdup the string?). Indeed. I think bouncing the error back to the caller is misguided to start with, seeing that the caller is just going to

Re: [HACKERS] [GENERAL] pg_upgrade from 9.5 to 9.6 fails with "invalid argument"

2016-09-29 Thread Tom Lane
I wrote: > But what gets my attention in this connection is that it doesn't > seem to be taking the trouble to open the files in binary mode. > Could that lead to the reported failure? Not sure, but it seems > like at the least it could result in corrupted VM files. On further thought, it

Re: [HACKERS] [GENERAL] pg_upgrade from 9.5 to 9.6 fails with "invalid argument"

2016-09-29 Thread Alvaro Herrera
Tom Lane wrote: > Thomas Kellerer writes: > > for some reason pg_upgrade failed on Windows 10 for me, with an error > > message that one specifc _vm file couldn't be copied. > > Hmm ... a _vm file would go through rewriteVisibilityMap(), which is new > code for 9.6 and

Re: [HACKERS] [GENERAL] pg_upgrade from 9.5 to 9.6 fails with "invalid argument"

2016-09-29 Thread Tom Lane
Thomas Kellerer writes: > for some reason pg_upgrade failed on Windows 10 for me, with an error message > that one specifc _vm file couldn't be copied. Hmm ... a _vm file would go through rewriteVisibilityMap(), which is new code for 9.6 and hasn't really gotten that much