pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Andres Freund <andres@anarazel.de>
To: Amit Khandekar <amitdkhan.pg@gmail.com>
Cc: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Haribabu Kommi <kommi.haribabu@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Subject: Re: TupleTableSlot abstraction
Date: Tue, 25 Sep 2018 16:45:09 -0700
Message-ID: <20180925234509.3hrrf6tmvy5tfith@alap3.anarazel.de> (raw )
In-Reply-To: <CAJ3gD9fLTn0U5N5iNPkSKFCWLDKfFO7AKq7L8ozxZ2QcuJEuiw@mail.gmail.com >
References: <CAFjFpReAJW0j18BzwxkOub01rFUrpdCgKPNrXAZ3PKMWFfQpyw@mail.gmail.com >
<CAFjFpRe82KbsBbCUUeagAoj_7MbBr_HW1J-_borLVzRjNP1BGQ@mail.gmail.com >
<20180817080706.a4hh4fluilejkjdi@alap3.anarazel.de >
<20180818152310.6quymlphu276mpwu@alap3.anarazel.de >
<CAFjFpRfScLMD6RkC=mkw3z-LNfa+K+=vY7JgXNXSgD9RBTMKcg@mail.gmail.com >
<20180820122822.uag4nlmslvajaacv@alap3.anarazel.de >
<CAFjFpRcNPQ1oOL41-HQYaEF=Nq6Vbg0eHeFgopJhHw_X2usA5w@mail.gmail.com >
<20180824011634.q2lrc6b26mjwoi5s@alap3.anarazel.de >
<CAFjFpRe1TZrDHwPq-EzTWd=N6keGNHj_+GWe_zyQ5ZooQ+4LeA@mail.gmail.com >
<CAJ3gD9fLTn0U5N5iNPkSKFCWLDKfFO7AKq7L8ozxZ2QcuJEuiw@mail.gmail.com >
Hi,
On 2018-09-04 18:35:34 +0530, Amit Khandekar wrote:
> Subject: [PATCH 05/14] Use tts_flags instead of previous bool members
>
> Pack the boolean members in TupleTableSlot into a 16 bit tts_flags.
> This reduces the size of TupleTableSlot since each bool member takes
> at least a byte on the platforms where bool is defined as a char.
>
> Ashutosh Bapat and Andres Freund
> +
> +/* true = slot is empty */
> +#define TTS_ISEMPTY (1 << 1)
> +#define IS_TTS_EMPTY(slot) ((slot)->tts_flags & TTS_ISEMPTY)
> +#define SET_TTS_EMPTY(slot) ((slot)->tts_flags |= TTS_ISEMPTY)
> +#define RESET_TTS_EMPTY(slot) ((slot)->tts_flags &= ~TTS_ISEMPTY)
The flag stuff is the right way, but I'm a bit dubious about the
accessor functions. I can see open-coding the accesses, using the
macros, or potentially going towards using bitfields.
Any comments?
- Andres
view thread (50+ messages) latest in thread
Message-ID: <20180925234509.3hrrf6tmvy5tfith@alap3.anarazel.de>
Permalink: ../20180925234509.3hrrf6tmvy5tfith@alap3.anarazel.de/
Also on: postgresql.org/message-id/20180925234509.3hrrf6tmvy5tfith@alap3.anarazel.de
copy link · copy postgr.es
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-hackers@postgresql.org
Cc: andres@anarazel.de, amitdkhan.pg@gmail.com, ashutosh.bapat@enterprisedb.com, robertmhaas@gmail.com, kommi.haribabu@gmail.com, alvherre@2ndquadrant.com, amit.kapila16@gmail.com
Subject: Re: TupleTableSlot abstraction
In-Reply-To: <20180925234509.3hrrf6tmvy5tfith@alap3.anarazel.de>
* 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