"Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp> writes:
> In addition I could find no other place to check
> index uniqueness in tuplesort.c .
> Seems we have to give up the uniqueness check in comparetup_
> index() and have to check it in _bt_buildadd().
Checking index uniqueness in tuplesort is pretty much of a hack,
although kind of cool since it doesn't take any extra comparisons
to do it there. But if we're doing the wrong thing then it has
to be removed.
I'm a little unclear on *why* it's wrong though. Don't we grab an
exclusive lock on a table while building an index for it? (If not,
shouldn't we be doing so?) I don't see how there can be tuples of
uncertain commit state that need to be included in the index.
regards, tom lane