Re: BUG #15858: could not stat file - over 4GB
Emil Iggland <emil@iggland.com>
From: Emil Iggland <emil@iggland.com>
To: pgsql-hackers@lists.postgresql.org
Cc: Juanjo Santamaria Flecha <juanjo.santamaria@gmail.com>
Date: 2020-02-05T11:46:33Z
Lists: pgsql-bugs, 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", as expected. 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
Commits
-
Minor cleanup for win32stat.c.
- fcd11329db5b 14.0 landed
- 961e07b8ccb5 14.0 landed
- c94cfb38c32a 14.0 landed
-
plperl.h should #undef fstat along with stat and lstat.
- ed30b1a60dad 14.0 cited
-
Fix our Windows stat() emulation to handle file sizes > 4GB.
- bed90759fcbc 14.0 landed