c36064e438
pg_upgrade: fix CopyFile() on Windows to fail on file existence
...
Also fix getErrorText() to return the right error string on failure.
This behavior now matches that of other operating systems.
Report by Noah Misch
Backpatch through 9.1
2015-11-24 17:18:27 -05:00
bdcbc2b471
pg_upgrade: properly detect file copy failure on Windows
...
Previously, file copy failures were ignored on Windows due to an
incorrect return value check.
Report by Manu Joye
Backpatch through 9.1
2015-11-14 11:47:11 -05:00
d73cc5857f
Properly check for readdir/closedir() failures
...
Clear errno before calling readdir() and handle old MinGW errno bug
while adding full test coverage for readdir/closedir failures.
Backpatch through 8.4.
2014-03-21 13:45:11 -04:00
663e27c405
Fix pg_upgrade's pg_scandir_internal() the right way. Backpatch to 9.1.
2011-11-17 13:40:45 -05:00
379aa2f5a4
Fix pg_upgrade's pg_scandir_internal() to properly handle a NULL
...
pattern, which is used on PG 9.1 and HEAD (but not pre-9.1). Fixes
crash on Windows.
Backpatched to 9.1.
Reported by Mark Dilger
2011-11-17 13:24:55 -05:00
469345e1e3
Fix use of unportable %m format
2011-07-07 22:53:51 +03:00
5c5f83507c
Adjust pg_upgrade FATAL error messages to have consistent newlines.
...
Also adjust some error message capitalization for consistency.
2011-05-06 21:47:42 -04:00
f6322b3191
In pg_upgrade, only compile copy_file() on non-Win32 systems.
...
Per report from Andrew Dunstan.
2011-04-23 20:28:29 -04:00
bf50caf105
pgindent run before PG 9.1 beta 1.
2011-04-10 11:42:00 -04:00
898a14e1a0
Remove unused copy_dir() function from pg_upgrade.
2011-03-15 20:52:35 -04:00
d367d41d66
Fix file descriptor leaks in pg_upgrade in failure code paths.
2011-03-08 21:36:17 -05:00
5d950e3b0c
Stamp copyrights for year 2011.
2011-01-01 13:18:15 -05:00
3864afa1d1
Clean up some copied-and-pasted code in pg_upgrade.
...
1. Don't reimplement S_ISDIR() and S_ISREG() badly.
2. Don't reimplement access() badly.
This code appears to have been copied from ancient versions of the
corresponding backend routines, and not patched to incorporate subsequent
fixes (see my commits of 2008-03-31 and 2010-01-14 respectively).
It might be a good idea to change it to just *call* those routines,
but for now I'll just transpose these fixes over.
2010-12-11 14:17:46 -05:00
07456b45e6
Pgindent run on pg_upgrade source after restructuring.
2010-10-19 22:37:04 +00:00
e13f7e9a71
Restructure the pg_upgrade code to use several global structures rather
...
than packing everything into 'ctx' and passing that to every function.
2010-10-19 21:38:34 +00:00
a1bb570de9
Fix leak patch that was using fclose() instead of close().
2010-09-28 21:27:32 +00:00
f175884520
Properly close files after read file failure to prevent potential
...
resource leak. Of course, any such failure aborts pg_upgrade, but might
as well be clean about it.
Per patch from Grzegorz Ja?kiewicz.
2010-09-28 19:28:34 +00:00
9f2e211386
Remove cvs keywords from all files.
2010-09-20 22:08:53 +02:00
a0d7c5f689
Properly report errno/out-of-disk-space error from pg_upgrade when in
...
copy mode, per report from depstein@alliedtesting.com .
Patch suggestion from Magnus.
Backpatch to 9.0.X.
2010-07-09 16:51:23 +00:00
239d769e7e
pgindent run for 9.0, second run
2010-07-06 19:19:02 +00:00
da254e3d16
Make pg_upgrade copyrights just 2010, not 2010-2010.
2010-07-03 16:33:15 +00:00
de255a6eb1
Add copyrights to pg_upgrade and pg_upgrade_tools files, per Tom.
2010-07-03 16:25:01 +00:00
ccbe0c14e6
Add CVS tags to pg_upgrade and pg_upgrade_support files, per request
...
from Tom.
2010-07-03 14:23:14 +00:00
600fc1dc9d
Get rid of some more stuff that duplicates c.h or port.h.
2010-07-01 15:52:52 +00:00
5c337fb45c
Adjust pg_upgrade BSD defines for scandir(), per report from Giles Lean
2010-05-15 10:21:54 +00:00
5781d96dc3
Change bsdi define to __bsdi__
2010-05-15 10:08:28 +00:00
adf6b8edfb
Spell __darwin__ correctly, to suppress compiler warning on OSX.
2010-05-14 00:19:46 +00:00
e9ad14f9f4
Use NAMEDATALEN instead of local define.
...
Modify path separators for Win32.
Per ideas from Takahiro Itagaki
2010-05-14 00:13:38 +00:00
36d3afd2d4
Remove all mentions of EnterpriseDB Advanced Server from pg_upgrade;
...
EDB must maintain their own patch set for this.
2010-05-13 22:51:00 +00:00
382ff21203
Fix up lame idea of not using autoconf to determine if platform has scandir().
...
Should fix buildfarm failures.
2010-05-13 22:07:43 +00:00
c9c25a982c
Clean up unnecessary unportability and compiler warnings by removing the
...
cmp parameter for pg_scandir(). The code failed to support this anyway
for Sun/Windows, so pretending we could accept a parameter other than
NULL was just asking for trouble.
2010-05-12 16:50:00 +00:00
c2e9b2f288
Add pg_upgrade to /contrib; will be in 9.0 beta2.
...
Add documentation.
Supports migration from PG 8.3 and 8.4.
2010-05-12 02:19:11 +00:00