pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add support for partial TOAST decompression
Date: Tue, 02 Apr 2019 16:36:33 +0000
Message-ID: <E1hBMOn-0006Oz-R1@gemulon.postgresql.org> (raw)

Add support for partial TOAST decompression

When asked for a slice of a TOAST entry, decompress enough to return the
slice instead of decompressing the entire object.

For use cases where the slice is at, or near, the beginning of the entry,
this avoids a lot of unnecessary decompression work.

This changes the signature of pglz_decompress() by adding a boolean to
indicate if it's ok for the call to finish before consuming all of the
source or destination buffers.

Author: Paul Ramsey
Reviewed-By: Rafia Sabih, Darafei Praliaskouski, Regina Obe
Discussion: https://postgr.es/m/CACowWR07EDm7Y4m2kbhN_jnys%3DBBf9A6768RyQdKm_%3DNpkcaWg%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4d0e994eed83c845a05da6e9a417b4efec67efaf

Modified Files
--------------
src/backend/access/heap/tuptoaster.c    | 38 +++++++++++++++++++++++++++--
src/backend/access/transam/xlogreader.c |  2 +-
src/backend/utils/adt/varlena.c         | 22 ++++++++++-------
src/common/pg_lzcompress.c              | 42 +++++++++++++++------------------
src/include/common/pg_lzcompress.h      |  2 +-
5 files changed, 70 insertions(+), 36 deletions(-)



Message-ID: <E1hBMOn-0006Oz-R1@gemulon.postgresql.org>
Permalink:  ../E1hBMOn-0006Oz-R1@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1hBMOn-0006Oz-R1@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: sfrost@snowman.net
  Subject: Re: pgsql: Add support for partial TOAST decompression
  In-Reply-To: <E1hBMOn-0006Oz-R1@gemulon.postgresql.org>
  References: <E1hBMOn-0006Oz-R1@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