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: Mostly-cosmetic adjustments of TOAST-related macros.
Date: Mon, 22 Mar 2021 18:01:31 +0000
Message-ID: <E1lOOrr-0005pi-8J@gemulon.postgresql.org> (raw)

Mostly-cosmetic adjustments of TOAST-related macros.

The authors of bbe0a81db hadn't quite got the idea that macros named
like SOMETHING_4B_C were only meant for internal endianness-related
details in postgres.h.  Choose more legible names for macros that are
intended to be used elsewhere.  Rearrange postgres.h a bit to clarify
the separation between those internal macros and ones intended for
wider use.

Also, avoid using the term "rawsize" for true decompressed size;
we've used "extsize" for that, because "rawsize" generally denotes
total Datum size including header.  This choice seemed particularly
unfortunate in tests that were comparing one of these meanings to
the other.

This patch includes a couple of not-purely-cosmetic changes: be
sure that the shifts aligning compression methods are unsigned
(not critical today, but will be when compression method 2 exists),
and fix broken definition of VARATT_EXTERNAL_GET_COMPRESSION (now
VARATT_EXTERNAL_GET_COMPRESS_METHOD), whose callers worked only
accidentally.

Discussion: https://postgr.es/m/574197.1616428079@sss.pgh.pa.us

Branch
------
master

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

Modified Files
--------------
src/backend/access/common/detoast.c           |   4 +-
src/backend/access/common/toast_compression.c |  40 +++++-----
src/backend/access/common/toast_internals.c   |   8 +-
src/include/access/toast_internals.h          |  13 ++--
src/include/postgres.h                        | 106 +++++++++++++-------------
5 files changed, 87 insertions(+), 84 deletions(-)



Message-ID: <E1lOOrr-0005pi-8J@gemulon.postgresql.org>
Permalink:  ../E1lOOrr-0005pi-8J@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1lOOrr-0005pi-8J@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: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Mostly-cosmetic adjustments of TOAST-related macros.
  In-Reply-To: <E1lOOrr-0005pi-8J@gemulon.postgresql.org>
  References: <E1lOOrr-0005pi-8J@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