Re: Bug in batch tuplesort memory CLUSTER case (9.6 only) - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Bug in batch tuplesort memory CLUSTER case (9.6 only)
Date
Msg-id CAM3SWZT2bRtqP2Vb0Ka4tYO8pFSsQ+kO-W7Ziiixpb_N4mRrhw@mail.gmail.com
Whole thread Raw
In response to Re: Bug in batch tuplesort memory CLUSTER case (9.6 only)  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Bug in batch tuplesort memory CLUSTER case (9.6 only)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, Jul 13, 2016 at 11:44 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> What I don't much like is that it enlarges cluster.out with 200K of
> random-looking, hard-to-manually-verify data.  May I suggest that
> we replace the SELECTs with
>
> select * from
> (select hundred, lag(hundred) over () as lhundred,
>         thousand, lag(thousand) over () as lthousand,
>         tenthous, lag(tenthous) over () as ltenthous from clstr_4) ss
> where row(hundred, thousand, tenthous) <= row(lhundred, lthousand, ltenthous);
>  hundred | lhundred | thousand | lthousand | tenthous | ltenthous
> ---------+----------+----------+-----------+----------+-----------
> (0 rows)

It independently occurred to me that I should have done something like
this afterwards. I agree.

> If you're good with that adjustment, I'm happy to commit this.

I am happy with the adjustment. Please commit the adjusted patch.

-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: A Modest Upgrade Proposal
Next
From: Robert Haas
Date:
Subject: Re: A Modest Upgrade Proposal