Bruce Momjian
c5391e9334
pg_dump, pg_upgrade: allow postgres/template1 tablespace moves
...
Modify pg_dump to restore postgres/template1 databases to non-default
tablespaces by switching out of the database to be moved, then switching
back.
Also, to fix potentially cases where the old/new tablespaces might not
match, fix pg_upgrade to process new/old tablespaces separately in all
cases.
Report by Marti Raudsepp
Patch by Marti Raudsepp, me
Backpatch through 9.0
10 years ago
Bruce Momjian
ce4f365188
pg_upgrade: don't copy/link files for invalid indexes
...
Now that pg_dump no longer dumps invalid indexes, per commit
683abc73df , have pg_upgrade also skip
them. Previously pg_upgrade threw an error if invalid indexes existed.
Backpatch to 9.2, 9.1, and 9.0 (where pg_upgrade was added to git)
13 years ago
Bruce Momjian
6cc2ed14f1
Fix pg_upgrade to properly upgrade a table that is stored in the cluster
...
default tablespace, but part of a database that is in a user-defined
tablespace. Caused "file not found" error during upgrade.
Per bug report from Ants Aasma.
Backpatch to 9.1 and 9.0.
14 years ago
Bruce Momjian
2e9633c362
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+.)
14 years ago
Bruce Momjian
39a713ea05
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.
15 years ago
Bruce Momjian
96a770d5da
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.
15 years ago
Bruce Momjian
bf50caf105
pgindent run before PG 9.1 beta 1.
15 years ago
Bruce Momjian
e69d32158c
Simplify structure of query used to gather database object information
...
in pg_upgrade.
15 years ago
Bruce Momjian
05d93c38a7
Tighten pg_upgrade check for pre-8.4 toast table name matching.
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
Bruce Momjian
9e5bed2df1
Restructure pg_upgrade checks because pre-8.4 Postgres did not rename
...
toast file names to match the new relfilenode.
15 years ago
Bruce Momjian
f7b70dfc76
Fix pg_upgrade to print the proper database name for file transfer
...
failures.
15 years ago
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.
15 years ago
Alvaro Herrera
b4a7e5980b
Cleanup ClusterInfo initialization in pg_upgrade
15 years ago
Bruce Momjian
1cc19cc358
Fix bug in 9.1 pg_upgrade processing of old/new relations; adjust debug
...
output.
15 years ago
Alvaro Herrera
8b2557553c
Make pg_upgrade compile again
15 years ago
Bruce Momjian
fe8f15d5d2
Adjust pg_upgrade error message, array freeing, and add error check.
15 years ago
Bruce Momjian
0a5f119931
A toast relid field are no longer needed in pg_upgrade's rel arrays, so
...
remove them. Also other renaming.
15 years ago
Bruce Momjian
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.
15 years ago
Bruce Momjian
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.
15 years ago
Bruce Momjian
2f657e4d72
More pg_upgrade relfilenode C comments added.
15 years ago
Bruce Momjian
f75383e6e8
In pg_upgrade, track only one copy of namespace/relname in FileNameMap
...
because the old and new values are identical.
15 years ago
Bruce Momjian
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.
15 years ago
Bruce Momjian
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.
15 years ago
Bruce Momjian
e66e43988a
Update pg_upgrade C comments.
15 years ago
Bruce Momjian
a45beaac64
Fix for recent pg_upgrade commit to fix large objects relfilenode
...
handling. (metadata user ids still an open issue).
15 years ago
Bruce Momjian
5cff5b5779
Clarify pg_upgrade's creation of the map file structure. Also clean
...
up pg_dump's calling of pg_upgrade_support functions.
15 years ago
Bruce Momjian
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.
15 years ago
Bruce Momjian
25cc7424e3
Simplify functions and parameters used by pg_upgrade.
15 years ago
Bruce Momjian
5d950e3b0c
Stamp copyrights for year 2011.
15 years ago
Bruce Momjian
67c9e4442f
Furter pg_upgrade optimizations to reduce function call argument count.
15 years ago
Bruce Momjian
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.
15 years ago
Bruce Momjian
f82b3e58f8
In pg_upgrade, rename "CLUSTERNAME" to "CLUSTER_NAME".
15 years ago
Bruce Momjian
16b5e08dec
Use "upgrade" in preference over "migrate" in pg_upgrade messages and
...
documentation. (Many were left over from the old pg_migrator naming.)
15 years ago
Bruce Momjian
a52aa6c6db
Clean up pg_upgrade cache lookup code; remove useless NULL pointer tests.
15 years ago
Bruce Momjian
691a67b922
Rename pg_upgrade 'log' to 'log_opts', to avoid platform naming conflict.
15 years ago
Bruce Momjian
3325c9bddb
Further speed up pg_upgrade lookups.
15 years ago
Bruce Momjian
1c72614be7
Fix for new pg_upgrade cache code.
15 years ago
Bruce Momjian
333b4a45f1
Cache most recent relfilenode lookups, for speed, after report of
...
pg_upgrade slowness for 150k tables.
15 years ago
Bruce Momjian
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.
15 years ago
Bruce Momjian
07456b45e6
Pgindent run on pg_upgrade source after restructuring.
15 years ago
Bruce Momjian
e13f7e9a71
Restructure the pg_upgrade code to use several global structures rather
...
than packing everything into 'ctx' and passing that to every function.
15 years ago
Bruce Momjian
807005c024
Use macro atooid() for conversion of strings to oids, per suggestion
...
from Tom.
15 years ago
Bruce Momjian
9340fb80b1
In pg_upgrade, properly handle oids > 2^31 by using strtoul() internally
...
rather than atol().
Per report from Brian Hirt
15 years ago
Magnus Hagander
9f2e211386
Remove cvs keywords from all files.
15 years ago
Bruce Momjian
239d769e7e
pgindent run for 9.0, second run
16 years ago
Bruce Momjian
da254e3d16
Make pg_upgrade copyrights just 2010, not 2010-2010.
16 years ago
Bruce Momjian
de255a6eb1
Add copyrights to pg_upgrade and pg_upgrade_tools files, per Tom.
16 years ago
Bruce Momjian
ccbe0c14e6
Add CVS tags to pg_upgrade and pg_upgrade_support files, per request
...
from Tom.
16 years ago