pgsql: Replace has_multiple_baserels() with a bitmap test on all_basere

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Replace has_multiple_baserels() with a bitmap test on all_basere
Date: 2023-10-10 17:08:45
Message-ID: E1qqGDs-000yzY-Ib@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Jeff Davis 2023-10-10 19:03:16 pgsql: Fix bug in GenericXLogFinish().
Previous Message Michael Paquier 2023-10-10 08:49:38 pgsql: test_decoding: Remove unnecessary table in twophase test