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

Commit71b6617

Browse files
committed
CREATE INDEX: do not update stats during binary upgrade.
During binary upgrade, indexes are created before the data is movedinto place, so it will always be zero.This is not currently a major problem, but will be when we try topreserve statistics during upgrade.Author: Corey HuinkerDiscussion:https://postgr.es/m/CADkLM=daPdFB8V0tgFxK-dLowFsAEzWRWJHyxij7BG3kBjcouA@mail.gmail.com
1 parent0628670 commit71b6617

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎src/backend/catalog/index.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2874,7 +2874,11 @@ index_update_stats(Relation rel,
28742874
dirty= true;
28752875
}
28762876

2877-
if (reltuples >=0)
2877+
/*
2878+
* Avoid updating statistics during binary upgrade, because the indexes
2879+
* are created before the data is moved into place.
2880+
*/
2881+
if (reltuples >=0&& !IsBinaryUpgrade)
28782882
{
28792883
BlockNumberrelpages=RelationGetNumberOfBlocks(rel);
28802884
BlockNumberrelallvisible;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp