Peter Eisentraut
d7fb49314d
Fix use of unportable %m format
2011-07-07 22:48:59 +03:00
Peter Eisentraut
76dfcb942f
Postgres -> PostgreSQL in error message
2011-07-05 22:41:14 +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
e3df3572f6
In pg_upgrade, clean up code layout in validateDirectoryOption().
2011-06-15 17:23:02 -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
Bruce Momjian
1f35944607
In pg_upgrade, clean up handling of invalid directory specification by
...
checking the stat() errno value more strictly.
2011-05-18 22:22:40 -04:00
Bruce Momjian
772a5f1e5b
Improve pg_upgrade error reporting if the bin or data directories do not
...
exist or are not directories.
2011-05-18 18:37:25 -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
92ff915018
Improve pg_upgrade X_OK comment.
2011-05-18 12:25:34 -04:00
Bruce Momjian
6fbf4e0e7c
Fix pg_upgrade build problem on Windows when using X_OK access
...
permission check on the current directory.
2011-05-18 12:13:37 -04:00
Bruce Momjian
e728701fb4
Update pg_upgrade directory check error message.
2011-05-16 12:32:36 -04:00
Bruce Momjian
bda27e502f
Add pg_upgrade check to make sure the user has full access permission in
...
the current directory; if not, throw an error.
2011-05-16 11:01:29 -04:00
Bruce Momjian
6c19bd96bc
Allow pg_upgrade to honor libpq environment variables. Add 'local'
...
checks for PGHOST and PGHOSTADDR.
2011-05-16 10:48:40 -04:00
Peter Eisentraut
00fad9f6fe
Format pg_upgrade --version in line with conventions
2011-05-10 21:40:29 +03:00
Peter Eisentraut
4c78846cb3
Add bug report line to pg_upgrade --help output
2011-05-10 21:37:55 +03:00
Bruce Momjian
5059cf6ebf
In pg_upgrade, remove suggestion of setting pg_hba.conf to 'trust', now
...
that we report the libpq connection failure string. Per suggestion from
Robert Haas.
2011-05-10 10:42:43 -04:00
Bruce Momjian
78318d63d7
In pg_upgrade, add status message about superuser check.
2011-05-09 08:55:36 -04:00
Bruce Momjian
e6a7402842
Add C comment why client encoding can be set in pg_upgrade.
2011-05-07 22:30:35 -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
Peter Eisentraut
d6d823c8b0
Improve formatting of pg_upgrade --help output
2011-05-05 23:19:13 +03:00
Bruce Momjian
6c4d2bd914
Now that pg_upgrade uses -w in pg_ctl, remove loop that retried testing
...
the connection; also restructure the libpq connection code.
This patch also removes the unused variable postmasterPID and fixes a
libpq structure leak that was in the testing loop.
2011-04-26 10:15:18 -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
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
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
0341944706
Add C comment
...
Add C comment about why we throw an error if the pg_upgrade old/new
database counts don't match.
2011-04-19 19:15:13 -04:00
Bruce Momjian
bf50caf105
pgindent run before PG 9.1 beta 1.
2011-04-10 11:42:00 -04:00
Peter Eisentraut
1eb2231fc4
Allow pg_upgrade with PGCLIENTENCODING set
...
This used to work, but since PGCLIENTENCODING is now a connection
option variable, pg_upgrade would prevent it.
2011-04-07 19:24:47 +03:00
Bruce Momjian
e69d32158c
Simplify structure of query used to gather database object information
...
in pg_upgrade.
2011-04-07 06:23:12 -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
da3418cea9
Mention pg_upgrade sets autovacuum_freeze_max_age to maximum.
2011-03-30 17:45:54 -04:00
Bruce Momjian
d609b08ead
Expand comment on how pg_upgrade is turning off autovacuum.
2011-03-30 17:37:00 -04:00
Bruce Momjian
d67b0bf471
In pg_upgrade, add C comment about how autovacuum is disabled.
2011-03-29 11:11:45 -04:00
Bruce Momjian
898a14e1a0
Remove unused copy_dir() function from pg_upgrade.
2011-03-15 20:52:35 -04:00
Bruce Momjian
d367d41d66
Fix file descriptor leaks in pg_upgrade in failure code paths.
2011-03-08 21:36:17 -05:00
Bruce Momjian
05d93c38a7
Tighten pg_upgrade check for pre-8.4 toast table name matching.
2011-03-06 21:57:37 -05:00
Tom Lane
dfe18f18d2
Fix a couple more missing "static" markers.
2011-03-06 20:14:01 -05:00
Bruce Momjian
a54ba23c08
Improve pg_upgrade relation name check logic for pre-8.4 servers.
2011-03-06 06:34:58 -05:00
Bruce Momjian
8f87dcd863
Update new pg_upgrade comment about pre-8.4 TOAST tables.
2011-03-05 22:09:35 -05:00
Bruce Momjian
9e5bed2df1
Restructure pg_upgrade checks because pre-8.4 Postgres did not rename
...
toast file names to match the new relfilenode.
2011-03-05 21:12:21 -05:00