Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7971a57

Browse files
committed
Fix pg_upgrade to preserve toast relfrozenxids for old 8.3 servers.
This fixes a pg_upgrade bug that could lead to query errors whenclog files are improperly removed.Backpatch to 8.4, 9.0, 9.1.
1 parent97930cf commit7971a57

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

‎src/bin/pg_dump/pg_dump.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3978,14 +3978,13 @@ getTables(int *numTables)
39783978
* owning column, if any (note this dependency is AUTO as of 8.2)
39793979
*/
39803980
appendPQExpBuffer(query,
3981-
"SELECT c.tableoid, c.oid, relname, "
3982-
"relacl, relkind, relnamespace, "
3983-
"(%s relowner) AS rolname, "
3984-
"relchecks, (reltriggers <> 0) AS relhastriggers, "
3985-
"relhasindex, relhasrules, relhasoids, "
3986-
"relfrozenxid, "
3987-
"0 AS toid, "
3988-
"0 AS tfrozenxid, "
3981+
"SELECT c.tableoid, c.oid, c.relname, "
3982+
"c.relacl, c.relkind, c.relnamespace, "
3983+
"(%s c.relowner) AS rolname, "
3984+
"c.relchecks, (c.reltriggers <> 0) AS relhastriggers, "
3985+
"c.relhasindex, c.relhasrules, c.relhasoids, "
3986+
"c.relfrozenxid, tc.oid AS toid, "
3987+
"tc.relfrozenxid AS tfrozenxid, "
39893988
"'p' AS relpersistence, "
39903989
"NULL AS reloftype, "
39913990
"d.refobjid AS owning_tab, "
@@ -3999,7 +3998,8 @@ getTables(int *numTables)
39993998
"d.classid = c.tableoid AND d.objid = c.oid AND "
40003999
"d.objsubid = 0 AND "
40014000
"d.refclassid = c.tableoid AND d.deptype = 'a') "
4002-
"WHERE relkind in ('%c', '%c', '%c', '%c') "
4001+
"LEFT JOIN pg_class tc ON (c.reltoastrelid = tc.oid) "
4002+
"WHERE c.relkind in ('%c', '%c', '%c', '%c') "
40034003
"ORDER BY c.oid",
40044004
username_subquery,
40054005
RELKIND_SEQUENCE,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp