pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: James Coleman <jtc331@gmail.com>
Cc: Neil Chen <carpenter.nail.cz@gmail.com>
Cc: contact@yorhel.nl, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #16846: "retrieved too many tuples in a bounded sort"
Date: Mon, 15 Feb 2021 10:18:46 -0500
Message-ID: <2251077.1613402326@sss.pgh.pa.us> (raw)
In-Reply-To: <CAAaqYe_m0Nmmr5m0W68A5O_RFvt1y+97rDh2g_UNYZddgM9ntg@mail.gmail.com>
References: <16846-ae49f51ac379a4cb@postgresql.org>
	<CAA3qoJ=OokS7T9K81dHSK85gKx+CbmuArf9uhrqJxT1qFjkz2Q@mail.gmail.com>
	<6068.1612484232@sss.pgh.pa.us>
	<CAA3qoJm1GCEEVT-9ZjfnF1Yh9yfL5wKRbT+HLKUd4pj-bn8c3w@mail.gmail.com>
	<CAAaqYe_dMDjhkq84ot-YJ47sqUgcOXuF4exbHWY56pB=4BjwKg@mail.gmail.com>
	<1451384.1613063158@sss.pgh.pa.us>
	<CAAaqYe_m0Nmmr5m0W68A5O_RFvt1y+97rDh2g_UNYZddgM9ntg@mail.gmail.com>

James Coleman <jtc331@gmail.com> writes:
> On Thu, Feb 11, 2021 at 12:06 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I stared at this for awhile and eventually convinced myself that it
>> implemented the same logic, but it still seems overly complex.  We
>> do not need either the firstTuple or lastTuple flags, and we could
>> convert the nTuple adjustments into a normal for-loop with (IMO)
>> much greater intelligibility.  What do you think of the attached?

> Yes, that looks even better. Not sure how I missed that I'd just
> reimplemented a normal for-loop with firstTuple/lastTuple conditions,
> but I guess that's the benefit of coming at it with fresh eyes and
> without the history of how it got the way it was.

> +1 on committing v2.

Sounds good, pushed.

			regards, tom lane





view thread (12+ messages)

Message-ID: <2251077.1613402326@sss.pgh.pa.us>
Permalink:  ../2251077.1613402326@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2251077.1613402326@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jtc331@gmail.com, carpenter.nail.cz@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #16846: "retrieved too many tuples in a bounded sort"
  In-Reply-To: <2251077.1613402326@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox