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

Appearance settings

Commit e3ba932

Browse filesBrowse files
Backpatch tuplesort.c assertion.
Backpatch an assertion (that was originally added to Postgres 12 by commit dd299df) that seems broadly useful. The assertion can detect violations of the HOT invariant (i.e. no two index tuples can point to the same heap TID) when CREATE INDEX somehow incorrectly allows that to take place. For example, a IndexBuildHeapScan/heapam_index_build_range_scan bug might result in two tuples that both point to the same heap TID. If these two tuples also happen to be duplicates, the assertion will fail. Discussion: https://postgr.es/m/CAH2-WzmBxu4o=pMsniur+bwHqCGCmV_AOLkuK6BuU7ngA6evqw@mail.gmail.com Backpatch: 9.5-11 only
1 parent 8a60f54 commit e3ba932
Copy full SHA for e3ba932

File tree

Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed

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

Copy file name to clipboardExpand all lines: src/backend/utils/sort/tuplesort.c
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4536,6 +4536,9 @@ comparetup_index_btree(const SortTuple *a, const SortTuple *b,
45364536
return (pos1 < pos2) ? -1 : 1;
45374537
}
45384538

4539+
/* ItemPointer values should never be equal */
4540+
Assert(false);
4541+
45394542
return 0;
45404543
}
45414544

@@ -4585,6 +4588,9 @@ comparetup_index_hash(const SortTuple *a, const SortTuple *b,
45854588
return (pos1 < pos2) ? -1 : 1;
45864589
}
45874590

4591+
/* ItemPointer values should never be equal */
4592+
Assert(false);
4593+
45884594
return 0;
45894595
}
45904596

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.