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

Commitfdbb979

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 parent9729f99 commitfdbb979

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
@@ -4173,6 +4173,9 @@ comparetup_index_btree(const SortTuple *a, const SortTuple *b,
41734173
return (pos1<pos2) ?-1 :1;
41744174
}
41754175

4176+
/* ItemPointer values should never be equal */
4177+
Assert(false);
4178+
41764179
return0;
41774180
}
41784181

@@ -4225,6 +4228,9 @@ comparetup_index_hash(const SortTuple *a, const SortTuple *b,
42254228
return (pos1<pos2) ?-1 :1;
42264229
}
42274230

4231+
/* ItemPointer values should never be equal */
4232+
Assert(false);
4233+
42284234
return0;
42294235
}
42304236

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp