Re: parallelize queries containing subplans

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: parallelize queries containing subplans
Date: 2017-01-14 12:15:19
Message-ID: CAA4eK1LK3NjNY4ghHUOwYfBFa+Ab2SvccTKAxTHbOdW1NhUjvQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

On Fri, Jan 13, 2017 at 7:13 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Dilip Kumar <dilipbalaut(at)gmail(dot)com> writes:
>> ERROR: did not find '}' at end of input node at character 762
>

I could reproduce this error with simple query like:
SELECT * FROM information_schema.role_usage_grants WHERE object_type
LIKE 'FOREIGN%' AND object_name IN ('s6', 'foo') ORDER BY 1, 2, 3, 4,
5;

The reason is that the stored rules have the old structure of Param. See below:
{RELABELTYPE :arg {PARAM :paramkind 2 :paramid 1 :paramtype 11975
:paramtypmod -1 :paramcollid 100 :location -1}

The new variable parallel_safe is not present in above node. If you
recreate the fresh database you won't see the above problem. I have
observed a problem in equal function which I have fixed in the
attached patch. I have also added a test, so that we can catch any
problem similar to what you have reported.

> I've not looked at the patches, but just seeing this error message,
> this looks like somebody's fat-fingered the correspondence between
> outfuncs.c and readfuncs.c processing.
>

I think what we need is catversion bump as Param is part of stored rules.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Attachment Content-Type Size
pq_pushdown_correl_subplan_v2.patch application/octet-stream 9.8 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gilles Darold 2017-01-14 13:02:40 Re: Patch to implement pg_current_logfile() function
Previous Message Kuntal Ghosh 2017-01-14 07:28:10 Re: macaddr 64 bit (EUI-64) datatype support