Thread: [COMMITTERS] pgsql: Push limit through subqueries to underlying sort,where possible

Push limit through subqueries to underlying sort, where possible.

Douglas Doole, reviewed by Ashutosh Bapat and by me.  Minor formatting
change by me.

Discussion: http://postgr.es/m/CADE5jYLuugnEEUsyW6Q_4mZFYTxHxaVCQmGAsF0yiY8ZDggi-w@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1f6d515a67ec98194c23a5db25660856c9aab944

Modified Files
--------------
src/backend/executor/nodeLimit.c        | 26 +++++++++++++++++
src/test/regress/expected/subselect.out | 52 +++++++++++++++++++++++++++++++++
src/test/regress/sql/subselect.sql      | 46 +++++++++++++++++++++++++++++
3 files changed, 124 insertions(+)


On 2017-08-21 18:42:56 +0000, Robert Haas wrote:
> Push limit through subqueries to underlying sort, where possible.
>
> Douglas Doole, reviewed by Ashutosh Bapat and by me.  Minor formatting
> change by me.
>
> Discussion: http://postgr.es/m/CADE5jYLuugnEEUsyW6Q_4mZFYTxHxaVCQmGAsF0yiY8ZDggi-w@mail.gmail.com

This seems to have caused some buildfarm failures:

https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=lapwing&dt=2017-08-23%2019%3A15%3A01
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=mantid&dt=2017-08-23%2019%3A33%3A18

(note the commits they started failing after)

- Andres


On Wed, Aug 23, 2017 at 5:55 PM, Andres Freund <andres@anarazel.de> wrote:
> On 2017-08-21 18:42:56 +0000, Robert Haas wrote:
>> Push limit through subqueries to underlying sort, where possible.
>>
>> Douglas Doole, reviewed by Ashutosh Bapat and by me.  Minor formatting
>> change by me.
>>
>> Discussion: http://postgr.es/m/CADE5jYLuugnEEUsyW6Q_4mZFYTxHxaVCQmGAsF0yiY8ZDggi-w@mail.gmail.com
>
> This seems to have caused some buildfarm failures:
>
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=lapwing&dt=2017-08-23%2019%3A15%3A01
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=mantid&dt=2017-08-23%2019%3A33%3A18
>
> (note the commits they started failing after)

Yeah, I noticed that earlier but didn't get time to reply.  I've now
replied on the original thread.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company