pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Replace has_multiple_baserels() with a bitmap test on all_basere
Date: Tue, 10 Oct 2023 17:08:45 +0000
Message-ID: <E1qqGDs-000yzY-Ib@gemulon.postgresql.org> (raw)

Replace has_multiple_baserels() with a bitmap test on all_baserels.

Since we added the PlannerInfo.all_baserels set, it's not really
necessary to grovel over the rangetable to count baserels in the
current query.  So let's drop has_multiple_baserels() in favor
of a bms_membership() test.  This might be microscopically
faster, but the main point is to remove some unnecessary code.

Richard Guo

Discussion: https://postgr.es/m/CAMbWs4_8RcSbbfs1ASZLrMuL0c0EQgXWcoLTQD8swBRY_pQQiA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/14661ba1a7a6b0f82b8451cbb51a5c2a11676635

Modified Files
--------------
src/backend/optimizer/path/allpaths.c | 24 +-----------------------
1 file changed, 1 insertion(+), 23 deletions(-)



Message-ID: <E1qqGDs-000yzY-Ib@gemulon.postgresql.org>
Permalink:  ../E1qqGDs-000yzY-Ib@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1qqGDs-000yzY-Ib@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: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Replace has_multiple_baserels() with a bitmap test on all_basere
  In-Reply-To: <E1qqGDs-000yzY-Ib@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