pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Rowley <dgrowleyml@gmail.com>
Cc: David Rowley <drowley@postgresql.org>
Cc: Jaime Casanova <jcasanov@systemguards.com.ec>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: jsonb crash
Date: Wed, 29 Sep 2021 17:20:09 -0400
Message-ID: <3002519.1632950409@sss.pgh.pa.us> (raw)
In-Reply-To: <CAApHDvozNHQfqUCfcZ2+J4jJWXHG8AHUU+VD94-ZLda25fWFxA@mail.gmail.com>
References: <20210929185544.GB24346@ahch-to>
	<2998377.1632945612@sss.pgh.pa.us>
	<2999546.1632947043@sss.pgh.pa.us>
	<CAApHDvo6XS8Gxs1JMROPdAX8MTe=FWCesH5Y+jzGZD3ADawsnQ@mail.gmail.com>
	<3001998.1632949788@sss.pgh.pa.us>
	<CAApHDvozNHQfqUCfcZ2+J4jJWXHG8AHUU+VD94-ZLda25fWFxA@mail.gmail.com>

David Rowley <dgrowleyml@gmail.com> writes:
> On Thu, 30 Sept 2021 at 10:09, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Um ... it seems to have correctly identified the cache key expressions,
>> so why isn't it just doing exprType on those?  The jsonb_exists operator
>> seems entirely irrelevant here.

> This is down to the caching stuff I added to RestrictInfo to minimise
> the amount of work done during the join search. I cached the hash
> equal function in RestrictInfo so I didn't have to check what that was
> each time we consider a join.  The problem is, that I did a bad job of
> taking inspiration from check_hashjoinable() which just looks at the
> left type.

I'm still confused.  AFAICS, the top-level operator of the qual clause has
exactly nada to do with the cache keys, as this example makes plain.

			regards, tom lane





view thread (23+ messages)  latest in thread

Message-ID: <3002519.1632950409@sss.pgh.pa.us>
Permalink:  ../3002519.1632950409@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3002519.1632950409@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, dgrowleyml@gmail.com, drowley@postgresql.org, jcasanov@systemguards.com.ec
  Subject: Re: jsonb crash
  In-Reply-To: <3002519.1632950409@sss.pgh.pa.us>
  References: <20210929185544.GB24346@ahch-to> <2998377.1632945612@sss.pgh.pa.us> <2999546.1632947043@sss.pgh.pa.us> <CAApHDvo6XS8Gxs1JMROPdAX8MTe=FWCesH5Y+jzGZD3ADawsnQ@mail.gmail.com> <3001998.1632949788@sss.pgh.pa.us> <CAApHDvozNHQfqUCfcZ2+J4jJWXHG8AHUU+VD94-ZLda25fWFxA@mail.gmail.com> <3002519.1632950409@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