Peter Eisentraut
1b12c3e836
pg_upgrade: Add new generated file to .gitignore
2012-03-20 20:40:31 +02:00
Bruce Momjian
02b183acb4
In pg_upgrade, remove dependency on pg_config, as that might not be in
...
the non-development install. Instead, use the LOAD mechanism to check
for the pg_upgrade_support shared object, like we do for other shared
object checks.
Backpatch to 9.1.
Report from Àlvaro
2012-03-19 09:31:50 -04:00
Bruce Momjian
ced53c38d7
In pg_upgrade, move new echo quote define into include file.
2012-03-17 09:56:56 -04:00
Bruce Momjian
faec2815c8
In pg_upgrade, create a script to incrementally generate more accurate
...
optimizer statistics so the cluster can be made available sooner.
2012-03-16 18:54:23 -04:00
Bruce Momjian
7c8cfed78a
Uppercase pg_upgrade status output title.
2012-03-14 19:22:11 -04:00
Bruce Momjian
717f6d6085
In pg_upgrade, add various logging improvements:
...
add ability to control permissions of created files
have psql echo its queries for easier debugging
output four separate log files, and delete them on success
add -r/--retain option to keep log files after success
make logs file append-only
remove -g/-G/-l logging options
sugggest tailing appropriate log file on failure
enhance -v/--verbose behavior
2012-03-12 19:48:03 -04:00
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
4e6092a227
Improve wording of pg_upgrade logfile option:
...
-l, --logfile=FILENAME log internal activity to file\n\
2012-02-22 18:40:32 -05:00
Bruce Momjian
7f951474dc
Have pg_upgrade output 'link' or 'copy' when reporting its status.
...
Idea from Peter.
2012-02-15 14:23:03 -05:00
Bruce Momjian
3946c28161
Fix pg_upgrade --help text for --user to not use a plural cluster name.
2012-01-26 22:18:58 -05:00
Bruce Momjian
6d5aae7afa
Now that the shared library name can be adjusted in the library test,
...
have pg_upgrade allocate a maximum fixed size buffer for testing the
library file name, rather than base the allocation on the library name.
Backpatch to 9.1.
2012-01-25 09:35:17 -05:00
Bruce Momjian
a7f2c79a6e
Improve plpython fix comment in pg_upgrade.
2012-01-24 22:49:55 -05:00
Bruce Momjian
cfe443ab9d
In pg_upgrade, when checking for the plpython library, we must check for
...
"plpython2" when upgrading from pre-PG 9.1. Patch to head and 9.1.
Per report from Peter.
2012-01-24 22:42:37 -05:00
Bruce Momjian
b95aec5290
Fix new SQL tablespace location function usage in pg_upgrade to properly
...
check cluster version numbers, and fix missing table alias.
2012-01-24 21:51:10 -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
Peter Eisentraut
d383c23f6f
Remove support for on_exit()
...
All supported platforms support the C89 standard function atexit()
(SunOS 4 probably being the last one not to), and supporting both
makes the code clumsy.
2011-12-27 20:57:59 +02:00
Peter Eisentraut
c317a3ac16
Run "make all" as a prerequisite of "make check"
...
This is the standard behavior but was forgotten in some places.
2011-12-27 20:27:24 +02:00
Magnus Hagander
16d8e594ac
Remove spclocation field from pg_tablespace
...
Instead, add a function pg_tablespace_location(oid) used to return
the same information, and do this by reading the symbolic link.
Doing it this way makes it possible to relocate a tablespace when the
database is down by simply changing the symbolic link.
2011-12-07 10:37:33 +01: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
Tom Lane
9c6aa8cca0
Move EXTRA_CLEAN to where it actually works.
2011-11-29 23:14:16 -05:00
Peter Eisentraut
b258ceb3ad
pg_upgrade: Disable installcheck
...
Disabled for now because some build farm members with low resources
are not prepared to handle it.
2011-11-29 06:57:09 +02:00
Peter Eisentraut
08da2d282f
Add pg_upgrade test suite
...
It runs the regression tests, runs pg_upgrade on the populated
database, and compares the before and after dumps. While not actually
a cross-version upgrade, this does detect omissions and bugs in the
involved tools from time to time. It's also possible to do a
cross-version upgrade by manually supplying parameters.
2011-11-27 22:42:32 +02: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
7012b5edb7
Remove scandir() requirement in pg_upgrade; instead just use readdir()
...
--- we were not using the scandir pattern filtering anyway. This also
removes the scandir requirement in configure.
2011-11-17 21:59:49 -05:00
Bruce Momjian
ee3ef8f30c
Fix pg_upgrade's pg_scandir_internal() the right way. Backpatch to 9.1.
2011-11-17 13:40:44 -05:00
Bruce Momjian
988f907d24
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:54 -05:00
Bruce Momjian
b735757c32
Remove pg_upgrade function no longer called (dir_matching_filenames).
2011-11-17 13:17:33 -05:00
Robert Haas
b76c61f1e8
Silence bogus compiler warning.
2011-11-04 10:40:52 -04:00
Robert Haas
c9f48b572c
Check the return value of getcwd(), instead of assuming success.
...
Kevin Grittner
2011-11-04 10:40:25 -04:00
Bruce Momjian
84b8fcaa92
Adjust pg_upgrade "new database skip" code, e.g. 'postgres', to more
...
cleanly handle old/new database mismatches.
2011-11-03 13:57:52 -04:00
Bruce Momjian
09d1174e5a
Update pg_upgrade comment on missing 'postgres' database.
2011-11-01 14:34:35 -04: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
51eba98cf4
Remove pg_upgrade dependency on the 'postgres' database existing in the
...
new cluster. vacuumdb, used by pg_upgrade, still has this dependency.
2011-10-28 21:19:21 -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
38f3c7c4dd
Update pg_upgrade testing instructions.
2011-10-27 21:29:03 -04:00
Bruce Momjian
0dc3f57ba0
In pg_upgrade, add -o/-O options to pass parameters to the servers, and
...
document its use for config-only directory installs.
2011-10-10 07:44:11 -04:00
Bruce Momjian
caa1054df8
In pg_upgrade, use the new postmaster -C option to get the real data
...
directory, for config-only directory installs. Only works for PG 9.2+
servers.
2011-10-07 14:40:23 -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
878b74e094
In pg_upgrade, remove unnecessary local variable.
2011-10-01 10:01:43 -04:00
Bruce Momjian
5e5958428b
In pg_upgrade, because toast table names can be mismatched with the heap
...
oid on 8.4, modify the toast name comparison test to only apply to old
9.0+ servers. (The test was previously 8.4+.)
Backpatch to 9.1.X.
2011-09-28 22:30:44 -04:00
Peter Eisentraut
52ce20589a
Add missing format attributes
...
Add __attribute__ decorations for printf format checking to the places that
were missing them. Fix the resulting warnings. Add
-Wmissing-format-attribute to the standard set of warnings for GCC, so these
don't happen again.
The warning fixes here are relatively harmless. The one serious problem
discovered by this was already committed earlier in
cf15fb5cab
.
2011-09-10 23:12:46 +03: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
Bruce Momjian
6416a82a62
Remove unnecessary #include references, per pgrminclude script.
2011-09-01 10:04:27 -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
eb013ede59
In pg_upgrade, limit schema name filter to include toast tables. Bug
...
introduced recently when trying to filter out temp tables.
Backpatch to 9.0 and 9.1.
2011-08-26 00:12:32 -04:00
Bruce Momjian
00a7c9014a
In pg_upgrade, don't copy visibility map files from clusters that did not
...
have crash-safe visibility maps to clusters that expect crash-safety.
Request from Robert Haas.
2011-08-19 11:20:30 -04:00
Bruce Momjian
2411fbdac4
In pg_upgrade, avoid dumping orphaned temporary tables. This makes the
...
pg_upgrade schema matching pattern match pg_dump/pg_dumpall.
Fix for 9.0, 9.1, and 9.2.
2011-08-15 22:40:14 -04:00