From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Rowley <dgrowleyml@gmail.com>
Cc: Richard Guo <guofenglinux@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: jeremyevans0@gmail.com, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #17495: Regression in 15beta1 when filtering subquery including row_number window function
Date: Wed, 25 May 2022 18:39:46 -0400
Message-ID: <2026718.1653518386@sss.pgh.pa.us> (raw)
In-Reply-To: <CAApHDvpADpzOGyC3B9iZaV6f3yG1J0i8CKv6f6y8BoVfvhe+4w@mail.gmail.com>
References: <17495-7ffe2fa0b261b9fa@postgresql.org>
<Yo19nvTiHUZDDqwl@paquier.xyz>
<CAApHDvrN70gq8jY+HjDwXG1015SOne9B8a2SBtAyxmn_v0ErYw@mail.gmail.com>
<CAMbWs49ZRn4Q+uQbOOnNzR5RdcxEppZ99TWuzVWwxPMdb1jr7A@mail.gmail.com>
<CAApHDvpADpzOGyC3B9iZaV6f3yG1J0i8CKv6f6y8BoVfvhe+4w@mail.gmail.com>
David Rowley <dgrowleyml@gmail.com> writes:
> Maybe a better fix is to add a new Bitmapset field to WindowClause and
> have find_window_run_conditions() record the attno in that field when
> it appends the new runCondition to the runCondition field.
> remove_unused_subquery_outputs() can just bms_add_members that field
> to attrs_used. This just means having to add a field to WindowClause
> post-beta. Is that going to be a problem?
It'd mean a forced initdb, which is not great, but unless 0ff20288e
gets reverted there'd be no additional impact on beta testers.
A bigger problem with what you describe is that I don't really think
the planner should be mucking with the input parse tree like that.
Can't we retain this information somewhere else instead, in storage
associated with the PlannerInfo?
regards, tom lane
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, guofenglinux@gmail.com, michael@paquier.xyz, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17495: Regression in 15beta1 when filtering subquery including row_number window function
In-Reply-To: <2026718.1653518386@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