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
e126958c2e
Update copyright notices for year 2012.
2012-01-01 18:01:58 -05:00
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
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
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
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
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
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
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
bf50caf105
pgindent run before PG 9.1 beta 1.
2011-04-10 11:42:00 -04:00
e69d32158c
Simplify structure of query used to gather database object information
...
in pg_upgrade.
2011-04-07 06:23:12 -04:00
05d93c38a7
Tighten pg_upgrade check for pre-8.4 toast table name matching.
2011-03-06 21:57:37 -05:00
a54ba23c08
Improve pg_upgrade relation name check logic for pre-8.4 servers.
2011-03-06 06:34:58 -05:00
8f87dcd863
Update new pg_upgrade comment about pre-8.4 TOAST tables.
2011-03-05 22:09:35 -05:00
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
f7b70dfc76
Fix pg_upgrade to print the proper database name for file transfer
...
failures.
2011-03-05 20:18:31 -05:00
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
b4a7e5980b
Cleanup ClusterInfo initialization in pg_upgrade
2011-02-16 14:06:17 -03:00
1cc19cc358
Fix bug in 9.1 pg_upgrade processing of old/new relations; adjust debug
...
output.
2011-02-15 19:01:33 -05:00
8b2557553c
Make pg_upgrade compile again
2011-02-15 19:52:32 -03:00
fe8f15d5d2
Adjust pg_upgrade error message, array freeing, and add error check.
2011-02-15 15:00:47 -05:00
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
002c105a07
In pg_upgrade, remove functions that did sequential array scans looking
...
up relations, but rather order old/new relations and use the same array
index value for both. This should speed up pg_upgrade for databases
with many relations.
2011-01-08 13:44:44 -05:00
a60b32b3dc
In pg_upgrade, remove unnecessary separate handling of toast tables now
...
that we restore by oid; they can be handled like regular tables when
creating the file mapping structure.
2011-01-08 08:01:52 -05:00
2f657e4d72
More pg_upgrade relfilenode C comments added.
2011-01-07 22:57:30 -05:00
f75383e6e8
In pg_upgrade, track only one copy of namespace/relname in FileNameMap
...
because the old and new values are identical.
2011-01-07 22:36:51 -05:00
d8d3d2a4f3
Fix pg_upgrade of large object permissions by preserving pg_auth.oid,
...
which is stored in pg_largeobject_metadata.
No backpatch to 9.0 because you can't migrate from 9.0 to 9.0 with the
same catversion (because of tablespace conflict), and a pre-9.0
migration to 9.0 has not large object permissions to migrate.
2011-01-07 21:59:29 -05:00
2896c87ce4
Force pg_upgrade's to preserve pg_class.oid, not pg_class.relfilenode.
...
Toast tables have identical pg_class.oid and pg_class.relfilenode, but
for clarity it is good to preserve the pg_class.oid.
Update comments regarding what is preserved, and do some
variable/function renaming for clarity.
2011-01-07 21:26:13 -05:00
e66e43988a
Update pg_upgrade C comments.
2011-01-05 14:09:01 -05:00
a45beaac64
Fix for recent pg_upgrade commit to fix large objects relfilenode
...
handling. (metadata user ids still an open issue).
2011-01-05 13:52:44 -05:00
5cff5b5779
Clarify pg_upgrade's creation of the map file structure. Also clean
...
up pg_dump's calling of pg_upgrade_support functions.
2011-01-05 11:37:08 -05:00
3302334b48
In pg_upgrade, copy pg_largeobject_metadata and its index for 9.0+
...
servers because, like pg_largeobject, it is a system table whose
contents are not dumped by pg_dump --schema-only.
2011-01-04 23:35:49 -05:00
25cc7424e3
Simplify functions and parameters used by pg_upgrade.
2011-01-04 19:11:37 -05:00
5d950e3b0c
Stamp copyrights for year 2011.
2011-01-01 13:18:15 -05:00
67c9e4442f
Furter pg_upgrade optimizations to reduce function call argument count.
2011-01-01 12:28:48 -05:00
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
f82b3e58f8
In pg_upgrade, rename "CLUSTERNAME" to "CLUSTER_NAME".
2010-12-31 20:42:29 -05:00
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
a52aa6c6db
Clean up pg_upgrade cache lookup code; remove useless NULL pointer tests.
2010-10-20 20:02:37 +00:00
691a67b922
Rename pg_upgrade 'log' to 'log_opts', to avoid platform naming conflict.
2010-10-20 02:31:17 +00:00
3325c9bddb
Further speed up pg_upgrade lookups.
2010-10-20 02:06:06 +00:00
1c72614be7
Fix for new pg_upgrade cache code.
2010-10-20 01:24:31 +00:00
333b4a45f1
Cache most recent relfilenode lookups, for speed, after report of
...
pg_upgrade slowness for 150k tables.
2010-10-20 00:55:16 +00:00
ad06db2610
In pg_upgrade, use cached copy of directory listing, rather than calling
...
scandir() with a pattern for every table.
Optimization after report of pg_upgrade slowness with 150k tables.
2010-10-20 00:33:19 +00:00
07456b45e6
Pgindent run on pg_upgrade source after restructuring.
2010-10-19 22:37:04 +00:00
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
807005c024
Use macro atooid() for conversion of strings to oids, per suggestion
...
from Tom.
2010-09-28 22:11:39 +00:00
9340fb80b1
In pg_upgrade, properly handle oids > 2^31 by using strtoul() internally
...
rather than atol().
Per report from Brian Hirt
2010-09-28 21:41:03 +00:00
9f2e211386
Remove cvs keywords from all files.
2010-09-20 22:08:53 +02:00
239d769e7e
pgindent run for 9.0, second run
2010-07-06 19:19:02 +00:00