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

Commit723acc9

Browse files
committed
Must check indisready not just indisvalid when dumping from 9.2 server.
9.2 uses a kluge representation of "indislive"; we have to account forthat when examining pg_index. Simplest solution is to check indisreadyfor 9.0 and 9.1 as well; that's harmless though unnecessary, so it'snot worth making a version distinction for.Fixes oversight in commit683abc7,as noted by Andres Freund.
1 parenteb2a70f commit723acc9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎src/bin/pg_dump/pg_dump.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4520,6 +4520,10 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables)
45204520
resetPQExpBuffer(query);
45214521
if (fout->remoteVersion >=90000)
45224522
{
4523+
/*
4524+
* the test on indisready is necessary in 9.2, and harmless in
4525+
* earlier/later versions
4526+
*/
45234527
appendPQExpBuffer(query,
45244528
"SELECT t.tableoid, t.oid, "
45254529
"t.relname AS indexname, "
@@ -4540,7 +4544,7 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables)
45404544
"i.indexrelid = c.conindid AND "
45414545
"c.contype IN ('p','u','x')) "
45424546
"WHERE i.indrelid = '%u'::pg_catalog.oid "
4543-
"AND i.indisvalid "
4547+
"AND i.indisvalidAND i.indisready"
45444548
"ORDER BY indexname",
45454549
tbinfo->dobj.catId.oid);
45464550
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp