pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Rowley <dgrowleyml@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: xinwen@stu.scu.edu.cn
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17777: An assert failed in nodeWindowAgg.c
Date: Mon, 13 Feb 2023 00:30:02 -0500
Message-ID: <1020528.1676266202@sss.pgh.pa.us> (raw)
In-Reply-To: <CAApHDvp==9GSDnbu1y3pYEgOgQBbGOGCC7xh8Ci=aj30687iug@mail.gmail.com>
References: <17777-860b739b6efde977@postgresql.org>
	<20230210230230.scuk6gqrks6c7sc7@awork3.anarazel.de>
	<439391.1676070752@sss.pgh.pa.us>
	<20230210232051.efjhtoqo6odk3gke@awork3.anarazel.de>
	<443909.1676073430@sss.pgh.pa.us>
	<20230211004940.t5l2dz7rnss76zao@awork3.anarazel.de>
	<CAApHDvpeXSU4A=mzX=96Rdn6u4gjVLHy8SMaVm_g01S8yhfAoQ@mail.gmail.com>
	<842393.1676218781@sss.pgh.pa.us>
	<CAApHDvrfuSuFq57EtbYxHNWYhMET9K_TpSefDUoM52-T6LCYbg@mail.gmail.com>
	<20230213004633.udoooi3gabxvtfbw@awork3.anarazel.de>
	<CAApHDvp==9GSDnbu1y3pYEgOgQBbGOGCC7xh8Ci=aj30687iug@mail.gmail.com>

David Rowley <dgrowleyml@gmail.com> writes:
> On Mon, 13 Feb 2023 at 13:46, Andres Freund <andres@anarazel.de> wrote:
>> What about find_compatible_agg()? I don't think there's as severe
>> consequences, but it also doesn't seem right as-is.

> This does not seem related to the issue being reported here. It seems
> to me this would only affect the aggregate deduplication logic and
> nothing else.

> For the case you're complaining about, I don't think shifting the
> goalposts randomly in back-branches is a good idea.  For the one you
> reported we might upset someone who has come to rely on the aggstate
> deduplication either for performance or for the number of volatile
> function evaluations. I'm not really on board with changing that
> unless someone highlights that it's causing an actual problem.

Yeah.  This behavior is at least semi-documented, IIRC.  We need to fix
moving-aggregate mode so it's not used when its assumptions don't hold,
because there's no way that that doesn't lead to insane behavior.  But
redefining the deduplication rules seems way more likely to break
existing queries than make anybody happy.

			regards, tom lane





view thread (18+ messages)  latest in thread

Message-ID: <1020528.1676266202@sss.pgh.pa.us>
Permalink:  ../1020528.1676266202@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1020528.1676266202@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, dgrowleyml@gmail.com, andres@anarazel.de, xinwen@stu.scu.edu.cn, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17777: An assert failed in nodeWindowAgg.c
  In-Reply-To: <1020528.1676266202@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