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

Commitaa02864

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 parent29505a8 commitaa02864

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
@@ -4901,6 +4901,10 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables)
49014901
resetPQExpBuffer(query);
49024902
if (fout->remoteVersion >=90000)
49034903
{
4904+
/*
4905+
* the test on indisready is necessary in 9.2, and harmless in
4906+
* earlier/later versions
4907+
*/
49044908
appendPQExpBuffer(query,
49054909
"SELECT t.tableoid, t.oid, "
49064910
"t.relname AS indexname, "
@@ -4922,7 +4926,7 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables)
49224926
"i.indexrelid = c.conindid AND "
49234927
"c.contype IN ('p','u','x')) "
49244928
"WHERE i.indrelid = '%u'::pg_catalog.oid "
4925-
"AND i.indisvalid "
4929+
"AND i.indisvalidAND i.indisready"
49264930
"ORDER BY indexname",
49274931
tbinfo->dobj.catId.oid);
49284932
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp