Re: Bug in batch tuplesort memory CLUSTER case (9.6 only)

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Noah Misch <noah(at)leadboat(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug in batch tuplesort memory CLUSTER case (9.6 only)
Date: 2016-07-13 18:46:57
Message-ID: CAM3SWZT2bRtqP2Vb0Ka4tYO8pFSsQ+kO-W7Ziiixpb_N4mRrhw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 13, 2016 at 11:44 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-07-13 19:06:23 Re: A Modest Upgrade Proposal
Previous Message Robert Haas 2016-07-13 18:45:06 Re: A Modest Upgrade Proposal