Re: pgsql: Rewrite the code that applies scan/join targets to paths.

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2018-03-30T15:45:43Z
Lists: pgsql-hackers
On Fri, Mar 30, 2018 at 1:03 AM, Andres Freund <andres@anarazel.de> wrote:
> Not 100% sure it's this patch, but if not, it's also one of the ones you
> committed ;)

Looks like it.

> There's a valgrind complaint:
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=lousyjack&dt=2018-03-30%2002%3A03%3A01
>
> Last file mtime in snapshot: Fri Mar 30 01:25:39 2018 GMT
> ===================================================
> ==6442== Invalid read of size 4
> ==6442==    at 0x78D725: apply_scanjoin_target_to_paths (planner.c:6843)

I've committed an attempt at a fix.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Commits

  1. Don't call IS_DUMMY_REL() when cheapest_total_path might be junk.

  2. Rewrite the code that applies scan/join targets to paths.

  3. Implement partition-wise grouping/aggregation.