Re: sqlsmith crash incremental sort - Mailing list pgsql-hackers

From James Coleman
Subject Re: sqlsmith crash incremental sort
Date
Msg-id CAAaqYe-SZUZRCYKZBUvrWDv=TTS6p4Xb8wO6cLXDsJhJ2D6K1Q@mail.gmail.com
Whole thread Raw
In response to Re: sqlsmith crash incremental sort  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: sqlsmith crash incremental sort  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
List pgsql-hackers
On Thu, Apr 16, 2020 at 9:26 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Tomas Vondra <tomas.vondra@2ndquadrant.com> writes:
> > I think we have essentially three options:
> > 1) assuming there's just a single group
> > 2) assuming each row is a separate group
> > 3) something in between
> > If (1) and (2) are worst/best-case scenarios, maybe we should pick
> > something in between. We have DEFAULT_NUM_DISTINCT (200) which
> > essentially says "we don't know what the number of groups is" so maybe
> > we should use that.
>
> I wouldn't recommend picking either the best or worst cases.
>
> Possibly DEFAULT_NUM_DISTINCT is a sane choice, though it's fair to
> wonder if it's quite applicable to the case where we already know
> we've grouped by some columns.

Do you think defining a new default, say,
DEFAULT_NUM_DISTINCT_PRESORTED is preferred then? And choose some
value like "1/2 of the normal DEFAULT_NUM_DISTINCT groups" or some
such?

James



pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: relocating the server's backup manifest code
Next
From: Andres Freund
Date:
Subject: Re: fixing old_snapshot_threshold's time->xid mapping