pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Improve code inferring length of bitmap for JITed tuple deformin
Date: Tue, 30 Apr 2019 23:32:01 +0000
Message-ID: <E1hLcED-0000Ke-F6@gemulon.postgresql.org> (raw)

Improve code inferring length of bitmap for JITed tuple deforming.

While discussing comment improvements (see next commit) by Justin
Pryzby, Tom complained about a few details of the logic to infer the
length of the NULL bitmap when building the JITed tuple deforming
function. That bitmap allows to avoid checking the tuple header's
natts, a check which often causes a pipeline stall

Improvements:
a) As long as missing columns aren't taken into account, we can
   continue to infer the length of the NULL bitmap from NOT NULL
   columns following it. Previously we stopped at the first missing
   column.  It's unlikely to matter much in practice, but the
   alternative would have been to document why we stop.
b) For robustness reasons it seems better to also check against
   attisdropped - RemoveAttributeById() sets attnotnull to false, but
   an additional check is trivial.
c) Improve related comments

Discussion: https://postgr.es/m/20637.1555957068@sss.pgh.pa.us
Backpatch: -

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3a48005b0049d69b4376e6ae386479ae3d255a11

Modified Files
--------------
src/backend/jit/llvm/llvmjit_deform.c | 37 +++++++++++++++++++----------------
1 file changed, 20 insertions(+), 17 deletions(-)



Message-ID: <E1hLcED-0000Ke-F6@gemulon.postgresql.org>
Permalink:  ../E1hLcED-0000Ke-F6@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1hLcED-0000Ke-F6@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 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-committers@postgresql.org
  Cc: andres@anarazel.de
  Subject: Re: pgsql: Improve code inferring length of bitmap for JITed tuple deformin
  In-Reply-To: <E1hLcED-0000Ke-F6@gemulon.postgresql.org>
  References: <E1hLcED-0000Ke-F6@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