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

Commit87eb255

Browse files
Backpatch tuplesort.c assertion.
Backpatch an assertion (that was originally added to Postgres 12 bycommitdd299df) that seems broadly useful. The assertion can detectviolations of the HOT invariant (i.e. no two index tuples can point tothe same heap TID) when CREATE INDEX somehow incorrectly allows that totake place.For example, a IndexBuildHeapScan/heapam_index_build_range_scan bugmight result in two tuples that both point to the same heap TID. Ifthese two tuples also happen to be duplicates, the assertion will fail.Discussion:https://postgr.es/m/CAH2-WzmBxu4o=pMsniur+bwHqCGCmV_AOLkuK6BuU7ngA6evqw@mail.gmail.comBackpatch: 9.5-11 only
1 parentbaecd27 commit87eb255

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎src/backend/utils/sort/tuplesort.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4076,6 +4076,9 @@ comparetup_index_btree(const SortTuple *a, const SortTuple *b,
40764076
return (pos1<pos2) ?-1 :1;
40774077
}
40784078

4079+
/* ItemPointer values should never be equal */
4080+
Assert(false);
4081+
40794082
return0;
40804083
}
40814084

@@ -4128,6 +4131,9 @@ comparetup_index_hash(const SortTuple *a, const SortTuple *b,
41284131
return (pos1<pos2) ?-1 :1;
41294132
}
41304133

4134+
/* ItemPointer values should never be equal */
4135+
Assert(false);
4136+
41314137
return0;
41324138
}
41334139

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp