Bruce Momjian
2127aac6ef
In pg_upgrade, only lock the old cluster if link mode is used, and do it
...
right after we restore the schema (a common failure point), and right
before we do the link operation.
Per suggesgtions from Robert and ^!C^!^@lvaro
2012-03-05 21:20:06 -05:00
Bruce Momjian
ecf7a2ea38
Add pg_upgrade C comment about why we check all relkinds for regtypes.
2012-01-19 16:04:34 -05:00
Bruce Momjian
e126958c2e
Update copyright notices for year 2012.
2012-01-01 18:01:58 -05:00
Bruce Momjian
0e8f6bf0e7
In pg_upgrade, allow tables using regclass to be upgraded because we
...
preserve pg_class oids since PG 9.0.
2011-12-05 16:45:19 -05:00
Bruce Momjian
32fb4546e3
Remove ENABLE_SAME_CATVERSION_UPGRADES as unnecessary.
2011-11-25 19:08:41 -05:00
Bruce Momjian
5df1403b0f
Add pg_upgrade ENABLE_SAME_CATVERSION_UPGRADES macro for testing to
...
allow upgrades of the same catalog version. (Doesn't work for
tablespaces, as indicated by C comment.)
2011-11-23 22:51:45 -05:00
Bruce Momjian
a50d860ae1
Allow pg_upgrade to upgrade an old cluster that doesn't have a
...
'postgres' database.
2011-11-01 13:49:48 -04:00
Bruce Momjian
9846dcfb9e
Clarify pg_upgrade error message that the 'postgres' database must exist
...
in the old cluster.
2011-10-28 08:09:15 -04:00
Bruce Momjian
a3996754cc
In pg_upgrade, improve popen() failure detection by checking for fgets()
...
failures.
2011-10-06 19:37:29 -04:00
Bruce Momjian
3ced32d24e
In pg_upgrade, disallow migration of 8.3 clusters using contrib/ltree
...
because its internal format was changed in 8.4.
Backpatch to 9.0 and 9.1.
Report by depesz, diagnosis by Tom.
2011-09-07 14:43:12 -04:00
Tom Lane
731ebb64b7
Fix not-backwards-compatible pg_upgrade test for prepared transactions.
...
There's no reason for this test to use the undocumented pg_prepared_xact()
function, when it can use the stable API pg_prepared_xacts instead.
Fixes breakage against 8.3, as reported by Justin Arnold.
2011-08-30 17:15:00 -04:00
Bruce Momjian
f1312b5ed3
Add postgres.h to *.c files for pg_upgrade, ltree, and btree_gist, and
...
remove from local *.h files.
Per suggestion from Alvaro.
2011-08-26 21:16:24 -04:00
Bruce Momjian
17a16eeb7c
In pg_upgrade, fix the -l/log option to work on Windows.
...
Also, double-quote the log file name in all places, to allow (on all
platforms) log file names with spaces.
Back patch to 9.0 and 9.1.
2011-07-20 18:31:03 -04:00
Peter Eisentraut
912bc4f038
Make pg_upgrade output more consistent with project style
...
Add errno-based output to error messages where appropriate, reformat
blocks to about 72 characters per line, use spaces instead of tabs for
indentation, and other style adjustments.
2011-07-12 07:13:51 +03:00
Bruce Momjian
a88f4496b7
Change pg_upgrade to use port 50432 by default to avoid unintended
...
client connections during the upgrade. Also rename data/bin/port
environment variables to being with 'PG'. Also no longer honor PGPORT.
2011-07-01 18:17:12 -04:00
Bruce Momjian
0b44818ead
In pg_upgrade, check that the binary and data directories are the same
...
major version.
Backpatch to 9.1.
Dan McGee
2011-06-22 20:48:34 -04:00
Bruce Momjian
3b3c2cf180
In pg_upgrade, fix odd function parameter wrapping.
2011-06-22 19:30:46 -04:00
Bruce Momjian
effbe6ecb4
Rename pg_upgrade directory validation function, for clarity.
2011-06-22 17:50:40 -04:00
Bruce Momjian
559b114dd4
Adjust pg_upgrade check for pg_upgrade_support to happen after the
...
binary directory has been validated.
Backpatch to 9.1.
Dan McGee
2011-06-22 17:47:23 -04:00
Bruce Momjian
b06ad7def8
Fix pg_upgrade status message capitalization mistake.
...
Backpatch to 9.1 and 9.0.
Dan McGee
2011-06-22 14:49:54 -04:00
Bruce Momjian
07d17a73ec
In pg_upgrade, check there are no prepared transactions.
2011-06-14 14:53:35 -04:00
Bruce Momjian
6560407c7d
Pgindent run before 9.1 beta2.
2011-06-09 14:32:50 -04:00
Bruce Momjian
11c08c3fd7
In pg_upgrade, do case-insensitive checks of locale, encoding, and ctype
...
because these are often inconsistently capitalized.
2011-05-24 15:59:34 -04:00
Peter Eisentraut
0ee391b77a
/contrib/foo -> contrib/foo
...
Since contrib is a relative directory specification, a leading slash
is inappropriate.
2011-05-19 00:30:31 +03:00
Bruce Momjian
78318d63d7
In pg_upgrade, add status message about superuser check.
2011-05-09 08:55:36 -04:00
Bruce Momjian
1609ca5adb
In pg_upgrade, report non-super-user username in error message.
2011-05-07 12:17:21 -04:00
Bruce Momjian
81301b8578
Check that the pg_upgrade user specified is a super-user.
...
Also report the error message when the post-pg_ctl connection fails.
Per private bug report from EnterpriseDB.
2011-05-07 08:55:45 -04:00
Bruce Momjian
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
Bruce Momjian
44091442db
In pg_upgrade, avoid one start/stop of the postmaster; use the -w
...
(wait) flag for pg_ctl start/stop; remove the unused "quiet" flag in
the functions for starting/stopping the postmaster.
2011-04-25 20:18:23 -04:00
Bruce Momjian
76dd09bbec
Add postmaster/postgres undocumented -b option for binary upgrades.
...
This option turns off autovacuum, prevents non-super-user connections,
and enables oid setting hooks in the backend. The code continues to use
the old autoavacuum disable settings for servers with earlier catalog
versions.
This includes a catalog version bump to identify servers that support
the -b option.
2011-04-25 12:00:21 -04:00
Bruce Momjian
0262251c33
Pg_upgrade C comment addition.
...
Document why we do the missing new database check during the check
phase.
2011-04-20 05:45:31 -04:00
Bruce Momjian
7228d02989
Throw error for mismatched pg_upgrade clusters
...
If someone removes the 'postgres' database from the old cluster and the
new cluster has a 'postgres' database, the number of databases will not
match. We actually could upgrade such a setup, but it would violate the
1-to-1 mapping of database counts, so we throw an error instead.
Previously they got an error during the upgrade, and not at the check
stage; PG 9.0.4 does the same.
2011-04-19 21:00:29 -04:00
Bruce Momjian
bf50caf105
pgindent run before PG 9.1 beta 1.
2011-04-10 11:42:00 -04:00
Peter Eisentraut
c75163842c
Replace the confusing exit_nicely() by an atexit/on_exit hook
2011-04-06 23:00:44 +03:00
Bruce Momjian
d367d41d66
Fix file descriptor leaks in pg_upgrade in failure code paths.
2011-03-08 21:36:17 -05:00
Tom Lane
dfe18f18d2
Fix a couple more missing "static" markers.
2011-03-06 20:14:01 -05:00
Bruce Momjian
fe8f15d5d2
Adjust pg_upgrade error message, array freeing, and add error check.
2011-02-15 15:00:47 -05:00
Bruce Momjian
2b6e2dee78
Fix wrong verb in pg_upgrade text message, per Haas.
2011-02-02 16:53:12 -05:00
Bruce Momjian
0a5f119931
A toast relid field are no longer needed in pg_upgrade's rel arrays, so
...
remove them. Also other renaming.
2011-01-10 11:46:02 -05:00
Bruce Momjian
5d950e3b0c
Stamp copyrights for year 2011.
2011-01-01 13:18:15 -05:00
Bruce Momjian
67c9e4442f
Furter pg_upgrade optimizations to reduce function call argument count.
2011-01-01 12:28:48 -05:00
Bruce Momjian
6e6bee987f
In pg_upgrade, remove use of whichCluster, and just pass old/new cluster
...
pointers, which simplifies the code. This was not possible in 9.0 because
everything was in a single nested struct, but is possible now.
Per suggestion from Tom.
2011-01-01 12:06:36 -05:00
Bruce Momjian
16b5e08dec
Use "upgrade" in preference over "migrate" in pg_upgrade messages and
...
documentation. (Many were left over from the old pg_migrator naming.)
2010-12-15 07:11:31 -05:00
Bruce Momjian
691a67b922
Rename pg_upgrade 'log' to 'log_opts', to avoid platform naming conflict.
2010-10-20 02:31:17 +00:00
Bruce Momjian
07456b45e6
Pgindent run on pg_upgrade source after restructuring.
2010-10-19 22:37:04 +00:00
Bruce Momjian
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
Bruce Momjian
722d5beeb2
In pg_upgrade, rename SHELL_EXT to SCRIPT_EXT, for clarity.
2010-10-19 15:57:55 +00:00
Bruce Momjian
51eeccd6cc
Add removal of PG_VERSION to optional old cluster deletion script.
...
Backpatch to 9.0.X.
2010-10-19 15:52:43 +00:00
Bruce Momjian
9df96f9bb1
In pg_upgrade, rename macro EXEC_EXT to SHELL_EXT for clarity.
...
Backpatch to 9.0.X.
2010-10-19 02:56:16 +00:00
Magnus Hagander
9f2e211386
Remove cvs keywords from all files.
2010-09-20 22:08:53 +02:00