Re: [HACKERS] [PATCH] Incremental sort - Mailing list pgsql-hackers

From Antonin Houska
Subject Re: [HACKERS] [PATCH] Incremental sort
Date
Msg-id 5513.1511346150@localhost
Whole thread Raw
In response to Re: [HACKERS] [PATCH] Incremental sort  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
List pgsql-hackers
Alexander Korotkov <a.korotkov@postgrespro.ru> wrote:

> Antonin Houska <ah@cybertec.at> wrote:

> >  * ExecIncrementalSort()
> >
> >  ** if (node->tuplesortstate == NULL)
> >
> >  If both branches contain the expression
> >
> >  node->groupsCount++;
> >
> >  I suggest it to be moved outside the "if" construct.
>
> Done.

One more comment on this: I wonder if the field isn't incremented too
early. It seems to me that the value can end up non-zero if the input set is
to be empty (not sure if it can happen in practice).

And finally one question about regression tests: what's the purpose of the
changes in contrib/postgres_fdw/sql/postgres_fdw.sql ? I see no
IncrementalSort node in the output.

--
Antonin Houska
Cybertec Schönig & Schönig GmbH
Gröhrmühlgasse 26
A-2700 Wiener Neustadt
Web: http://www.postgresql-support.de, http://www.cybertec.at


pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: [HACKERS] UPDATE of partition key
Next
From: Amit Khandekar
Date:
Subject: Re: [HACKERS] UPDATE of partition key