pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: xinwen@stu.scu.edu.cn, pgsql-bugs@lists.postgresql.org, David Rowley <dgrowleyml@gmail.com>
Subject: Re: BUG #17777: An assert failed in nodeWindowAgg.c
Date: Fri, 10 Feb 2023 20:08:09 -0500
Message-ID: <451442.1676077689@sss.pgh.pa.us> (raw)
In-Reply-To: <20230211004940.t5l2dz7rnss76zao@awork3.anarazel.de>
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>

Andres Freund <andres@anarazel.de> writes:
> I think we could just add a !contain_subplans() to the code deciding whether
> it's safe to use the movable window optimization?

Yeah, perhaps.  That doesn't seem like a mainstream use-case either.

Another idea, tying into your previous point, is to try to check
contain_volatile_functions in the planner before we've reduced
sublinks to subplans.  I'm not sure that would be convenient to do
though; subplan-conversion happens pretty early.

(I'm quite hesitant to move the goalposts on what
contain_volatile_functions detects.  As that comment indicates,
some thought has gone into its current behavior, and I think
we might hit some unwanted side-effects if we change it.)

			regards, tom lane





view thread (18+ messages)  latest in thread

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