Re: Planner regression in 9.1: min(x) cannot use partial index with NOT NULL - Mailing list pgsql-hackers

From Marti Raudsepp
Subject Re: Planner regression in 9.1: min(x) cannot use partial index with NOT NULL
Date
Msg-id AANLkTimyuz+NJPbXm6t6HDe-KSAP9zXvCd6WN-9x07nZ@mail.gmail.com
Whole thread Raw
In response to Re: Planner regression in 9.1: min(x) cannot use partial index with NOT NULL  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, Mar 22, 2011 at 01:02, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I studied the code some more, and I think this probably can be made to
> work.  The basic idea is to have preprocess_minmax_aggregates build
> simplified queries like the above (working by modifying the query tree
> that exists at the point where it's called) and call query_planner on
> them.  Save aside the resulting path data, then let the regular planning
> process continue.  When optimize_minmax_aggregates is called, see
> whether the regular plan is cheaper than the sum of the path costs.
> If not, use the paths to construct a replacement plan, same as now.

Thanks a lot! I can confirm that this is fixed now in git version, and
now also works with partitioned tables, which is great news.

Regards,
Marti


pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Sync Rep v19
Next
From: Heikki Linnakangas
Date:
Subject: Re: Replication server timeout patch