pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Core dump in range_table_mutator()
Date: Fri, 24 Jun 2022 23:39:09 -0400
Message-ID: <631351.1656128349@sss.pgh.pa.us> (raw)
In-Reply-To: <CAEZATCUGrsO1=ZOkj4uj1rYEEvQBCMT6xZdKFQqTo35zEQiY6A@mail.gmail.com>
References: <545569.1656107045@sss.pgh.pa.us>
	<CAEZATCUGrsO1=ZOkj4uj1rYEEvQBCMT6xZdKFQqTo35zEQiY6A@mail.gmail.com>

Dean Rasheed <dean.a.rasheed@gmail.com> writes:
> Not directly related to that change ... I think it would be easier to
> follow if the CHECKFLATCOPY() was replaced with a separate Assert()
> and FLATCOPY() (I had to go and remind myself what CHECKFLATCOPY()
> did).
> Doing that would allow CHECKFLATCOPY() to be deleted, since this is
> the only place that uses it -- every other case knows the node type is
> correct before doing a FLATCOPY().

Well, if we want to clean this up a bit rather than just doing the
minimum safe fix ... I spent some time why we were bothering with the
FLATCOPY step at all, rather than just mutating the Query* pointer.
I think the reason is to not fail if the QTW_DONT_COPY_QUERY flag is
set, but maybe we should clear that flag when recursing?

			regards, tom lane





view thread (5+ messages)  latest in thread

Message-ID: <631351.1656128349@sss.pgh.pa.us>
Permalink:  ../631351.1656128349@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/631351.1656128349@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, dean.a.rasheed@gmail.com
  Subject: Re: Core dump in range_table_mutator()
  In-Reply-To: <631351.1656128349@sss.pgh.pa.us>
  References: <545569.1656107045@sss.pgh.pa.us> <CAEZATCUGrsO1=ZOkj4uj1rYEEvQBCMT6xZdKFQqTo35zEQiY6A@mail.gmail.com> <631351.1656128349@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