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.
15 years ago
Peter Eisentraut
d7fb49314d
Fix use of unportable %m format
15 years ago
Peter Eisentraut
76dfcb942f
Postgres -> PostgreSQL in error message
15 years ago
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.
15 years ago
Bruce Momjian
0b44818ead
In pg_upgrade, check that the binary and data directories are the same
...
major version.
Backpatch to 9.1.
Dan McGee
15 years ago
Bruce Momjian
3b3c2cf180
In pg_upgrade, fix odd function parameter wrapping.
15 years ago
Bruce Momjian
effbe6ecb4
Rename pg_upgrade directory validation function, for clarity.
15 years ago
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
15 years ago
Bruce Momjian
b06ad7def8
Fix pg_upgrade status message capitalization mistake.
...
Backpatch to 9.1 and 9.0.
Dan McGee
15 years ago
Bruce Momjian
e3df3572f6
In pg_upgrade, clean up code layout in validateDirectoryOption().
15 years ago
Bruce Momjian
07d17a73ec
In pg_upgrade, check there are no prepared transactions.
15 years ago
Bruce Momjian
6560407c7d
Pgindent run before 9.1 beta2.
15 years ago
Bruce Momjian
11c08c3fd7
In pg_upgrade, do case-insensitive checks of locale, encoding, and ctype
...
because these are often inconsistently capitalized.
15 years ago
Bruce Momjian
1f35944607
In pg_upgrade, clean up handling of invalid directory specification by
...
checking the stat() errno value more strictly.
15 years ago
Bruce Momjian
772a5f1e5b
Improve pg_upgrade error reporting if the bin or data directories do not
...
exist or are not directories.
15 years ago
Peter Eisentraut
0ee391b77a
/contrib/foo -> contrib/foo
...
Since contrib is a relative directory specification, a leading slash
is inappropriate.
15 years ago
Bruce Momjian
92ff915018
Improve pg_upgrade X_OK comment.
15 years ago
Bruce Momjian
6fbf4e0e7c
Fix pg_upgrade build problem on Windows when using X_OK access
...
permission check on the current directory.
15 years ago
Bruce Momjian
e728701fb4
Update pg_upgrade directory check error message.
15 years ago
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.
15 years ago
Bruce Momjian
6c19bd96bc
Allow pg_upgrade to honor libpq environment variables. Add 'local'
...
checks for PGHOST and PGHOSTADDR.
15 years ago
Peter Eisentraut
00fad9f6fe
Format pg_upgrade --version in line with conventions
15 years ago
Peter Eisentraut
4c78846cb3
Add bug report line to pg_upgrade --help output
15 years ago
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.
15 years ago
Bruce Momjian
78318d63d7
In pg_upgrade, add status message about superuser check.
15 years ago
Bruce Momjian
e6a7402842
Add C comment why client encoding can be set in pg_upgrade.
15 years ago
Bruce Momjian
1609ca5adb
In pg_upgrade, report non-super-user username in error message.
15 years ago
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.
15 years ago
Bruce Momjian
5c5f83507c
Adjust pg_upgrade FATAL error messages to have consistent newlines.
...
Also adjust some error message capitalization for consistency.
15 years ago
Peter Eisentraut
d6d823c8b0
Improve formatting of pg_upgrade --help output
15 years ago
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.
15 years ago
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.
15 years ago
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.
15 years ago
Bruce Momjian
f6322b3191
In pg_upgrade, only compile copy_file() on non-Win32 systems.
...
Per report from Andrew Dunstan.
15 years ago
Bruce Momjian
0262251c33
Pg_upgrade C comment addition.
...
Document why we do the missing new database check during the check
phase.
15 years ago
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.
15 years ago
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.
15 years ago
Bruce Momjian
bf50caf105
pgindent run before PG 9.1 beta 1.
15 years ago
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.
15 years ago
Bruce Momjian
e69d32158c
Simplify structure of query used to gather database object information
...
in pg_upgrade.
15 years ago
Peter Eisentraut
c75163842c
Replace the confusing exit_nicely() by an atexit/on_exit hook
15 years ago
Bruce Momjian
da3418cea9
Mention pg_upgrade sets autovacuum_freeze_max_age to maximum.
15 years ago
Bruce Momjian
d609b08ead
Expand comment on how pg_upgrade is turning off autovacuum.
15 years ago
Bruce Momjian
d67b0bf471
In pg_upgrade, add C comment about how autovacuum is disabled.
15 years ago
Bruce Momjian
898a14e1a0
Remove unused copy_dir() function from pg_upgrade.
15 years ago
Bruce Momjian
d367d41d66
Fix file descriptor leaks in pg_upgrade in failure code paths.
15 years ago
Bruce Momjian
05d93c38a7
Tighten pg_upgrade check for pre-8.4 toast table name matching.
15 years ago
Tom Lane
dfe18f18d2
Fix a couple more missing "static" markers.
15 years ago
Bruce Momjian
a54ba23c08
Improve pg_upgrade relation name check logic for pre-8.4 servers.
15 years ago
Bruce Momjian
8f87dcd863
Update new pg_upgrade comment about pre-8.4 TOAST tables.
15 years ago