Re: BUG #15858: could not stat file - over 4GB - Mailing list pgsql-hackers

From Emil Iggland
Subject Re: BUG #15858: could not stat file - over 4GB
Date
Msg-id 158090319335.731.5370958126217783154.pgcf@coridan.postgresql.org
Whole thread Raw
Responses Re: BUG #15858: could not stat file - over 4GB
List pgsql-hackers
The following review has been posted through the commitfest application:
make installcheck-world:  not tested
Implements feature:       tested, passed
Spec compliant:           not tested
Documentation:            not tested

I ran into this problem when using psql.exe and copy command. 

I have checked out 11.6-release tarball and applied the patch. 
The patch does not apply cleanly, but can be easily modified to apply. See Note 1.
After applying the patch I built using "build psql" and ran the new psql.exe binary.

In order to test I have done the following: 
Against a PostgreSQL 11 server run two commands: 
"COPY public.table FROM 'C:/file'" and "\copy public.table FROM 'C:/file'"
The first one runs in the context of the server, and does not work. It aborts with an error saying "cannot stat file",
asexpected. 
 
The seconds on runs in the context of the new binary and does work. It copies data as expected. 



Note 1: 
src/tools/msvc/Mkvcbuild.pm should be 

-      sprompt.c strerror.c tar.c thread.c getopt.c getopt_long.c dirent.c
-      win32env.c win32error.c win32security.c win32setlocale.c);
+      sprompt.c tar.c thread.c getopt.c getopt_long.c dirent.c
+      win32env.c win32error.c win32security.c win32setlocale.c win32_stat.c);

The new status of this patch is: Waiting on Author

pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Identifying user-created objects
Next
From: Etsuro Fujita
Date:
Subject: Re: [HACKERS] advanced partition matching algorithm forpartition-wise join