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
Bruce Momjian
f7b70dfc76
Fix pg_upgrade to print the proper database name for file transfer
...
failures.
2011-03-05 20:18:31 -05:00
Bruce Momjian
a3375becfa
Print clearer failure message when pg_upgrade fails due to a fatal
...
error.
2011-03-05 19:32:53 -05:00
Bruce Momjian
497e65f822
In pg_upgrade, no need to initialize global struct values; they are
...
always zeros. Also no need to free memory before we exit.
2011-02-16 15:17:28 -05:00
Alvaro Herrera
b4a7e5980b
Cleanup ClusterInfo initialization in pg_upgrade
2011-02-16 14:06:17 -03:00
Bruce Momjian
1cc19cc358
Fix bug in 9.1 pg_upgrade processing of old/new relations; adjust debug
...
output.
2011-02-15 19:01:33 -05:00
Alvaro Herrera
8b2557553c
Make pg_upgrade compile again
2011-02-15 19:52:32 -03:00
Bruce Momjian
fe8f15d5d2
Adjust pg_upgrade error message, array freeing, and add error check.
2011-02-15 15:00:47 -05:00
Tom Lane
629b3af27d
Convert contrib modules to use the extension facility.
...
This isn't fully tested as yet, in particular I'm not sure that the
"foo--unpackaged--1.0.sql" scripts are OK. But it's time to get some
buildfarm cycles on it.
sepgsql is not converted to an extension, mainly because it seems to
require a very nonstandard installation process.
Dimitri Fontaine and Tom Lane
2011-02-13 22:54:49 -05:00
Tom Lane
caddcb8f4b
Fix pg_upgrade to handle extensions.
...
This follows my proposal of yesterday, namely that we try to recreate the
previous state of the extension exactly, instead of allowing CREATE
EXTENSION to run a SQL script that might create some entirely-incompatible
on-disk state. In --binary-upgrade mode, pg_dump won't issue CREATE
EXTENSION at all, but instead uses a kluge function provided by
pg_upgrade_support to recreate the pg_extension row (and extension-level
pg_depend entries) without creating any member objects. The member objects
are then restored in the same way as if they weren't members, in particular
using pg_upgrade's normal hacks to preserve OIDs that need to be preserved.
Then, for each member object, ALTER EXTENSION ADD is issued to recreate the
pg_depend entry that marks it as an extension member.
In passing, fix breakage in pg_upgrade's enum-type support: somebody didn't
fix it when the noise word VALUE got added to ALTER TYPE ADD. Also,
rationalize parsetree representation of COMMENT ON DOMAIN and fix
get_object_address() to allow OBJECT_DOMAIN.
2011-02-09 19:18:08 -05:00
Tom Lane
cd7d748d51
Repair multiple breakage in Windows-specific code for appending '.exe'.
2011-02-02 20:26:43 -05:00