Re: tuple radix sort - Mailing list pgsql-hackers

From cca5507
Subject Re: tuple radix sort
Date
Msg-id tencent_0A6A072C7636A1238520B50E29D332627808@qq.com
Whole thread Raw
In response to Re: tuple radix sort  (John Naylor <johncnaylorls@gmail.com>)
Responses Re: tuple radix sort
List pgsql-hackers
Hi John,

One additional comment:

```
    /* presorted check */
    for (SortTuple *st = data + 1; st < data + n; st++)
    {
        CHECK_FOR_INTERRUPTS();

        if (COMPARETUP(state, st - 1, st) > 0)
        {
            presorted = false;
            break;
        }
    }
    if (presorted)
        return;
```

I think we need to add a comment to explain why we do the
check. The cost of this check is not small.

--
Regards,
ChangAo Chen

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Fix wrong log in pgstat_report_checksum_failures_in_db()
Next
From: Michael Paquier
Date:
Subject: Re: Our ABI diff infrastructure ignores enum SysCacheIdentifier