pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Korotkov <akorotkov@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Make replace_relid() leave argument unmodified
Date: Wed, 27 Dec 2023 01:58:21 +0000
Message-ID: <E1rIJBc-00C50g-I0@gemulon.postgresql.org> (raw)

Make replace_relid() leave argument unmodified

There are a lot of situations when we share the same pointer to a Bitmapset
structure across different places.  In order to evade undesirable side effects
replace_relid() function should always return a copy.

Reported-by: Richard Guo
Discussion: https://postgr.es/m/CAMbWs4_wJthNtYBL%2BSsebpgF-5L2r5zFFk6xYbS0A78GKOTFHw%40mail.gmail.com
Reviewed-by: Richard Guo, Andres Freund, Ashutosh Bapat, Andrei Lepikhov

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e0477837ce49d73c9f21a5e00143b741ce6e1f89

Modified Files
--------------
src/backend/optimizer/plan/analyzejoins.c | 11 ++++++++---
src/test/regress/expected/join.out        | 15 +++++++++++++++
src/test/regress/sql/join.sql             |  6 ++++++
3 files changed, 29 insertions(+), 3 deletions(-)



Message-ID: <E1rIJBc-00C50g-I0@gemulon.postgresql.org>
Permalink:  ../E1rIJBc-00C50g-I0@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rIJBc-00C50g-I0@gemulon.postgresql.org

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: akorotkov@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Make replace_relid() leave argument unmodified
  In-Reply-To: <E1rIJBc-00C50g-I0@gemulon.postgresql.org>

* 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