postgresql/src/backend/access
Peter Geoghegan 5da8bf8bbb Avoid CREATE INDEX unique index deduplication.
There is no advantage to attempting deduplication for a unique index
during CREATE INDEX, since there cannot possibly be any duplicates.
Doing so wastes cycles due to unnecessary copying.  Make sure that we
avoid it consistently.

We already avoided unique index deduplication in the case where there
were some spool2 tuples to merge.  That didn't account for the fact that
spool2 is removed early/unset in the common case where it has no tuples
that need to be merged (i.e. it failed to account for the "spool2 turns
out to be unnecessary" optimization in _bt_spools_heapscan()).

Oversight in commit 0d861bbb, which added nbtree deduplication

Backpatch: 13-, where nbtree deduplication was introduced.
2020-07-17 09:50:48 -07:00
..
brin Remove WARNING message from brin_desummarize_range 2020-07-09 20:13:25 -04:00
common code: replace 'master' with 'primary' where appropriate. 2020-07-08 12:57:23 -07:00
gin Modify additional power 2 calculations to use new helper functions 2020-04-08 18:29:51 +12:00
gist code: replace 'master' with 'primary' where appropriate. 2020-07-08 12:57:23 -07:00
hash Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
heap Fix comments related to table AMs 2020-07-14 13:17:11 +09:00
index Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
nbtree Avoid CREATE INDEX unique index deduplication. 2020-07-17 09:50:48 -07:00
rmgrdesc Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
spgist Fix masking of SP-GiST pages during xlog consistency check 2020-06-20 17:34:51 +03:00
table Fix misuse of table_index_fetch_tuple_check(). 2020-06-25 10:55:28 -07:00
tablesample Move src/backend/utils/hash/hashfn.c to src/common 2020-02-27 09:25:41 +05:30
transam Fix uninitialized value in segno calculation 2020-07-13 13:49:51 -04:00
Makefile Introduce access/{table.h, relation.h}, for generic functions from heapam.h. 2019-01-21 10:51:36 -08:00