pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Move pg_lzcompress.c to src/common.
Date: Mon, 09 Feb 2015 06:16:28 +0000
Message-ID: <E1YKhe0-0007ng-0n@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Move pg_lzcompress.c to src/common.

The meta data of PGLZ symbolized by PGLZ_Header is removed, to make
the compression and decompression code independent on the backend-only
varlena facility. PGLZ_Header is being used to store some meta data
related to the data being compressed like the raw length of the uncompressed
record or some varlena-related data, making it unpluggable once PGLZ is
stored in src/common as it contains some backend-only code paths with
the management of varlena structures. The APIs of PGLZ are reworked
at the same time to do only compression and decompression of buffers
without the meta-data layer, simplifying its use for a more general usage.

On-disk format is preserved as well, so there is no incompatibility with
previous major versions of PostgreSQL for TOAST entries.

Exposing compression and decompression APIs of pglz makes possible its
use by extensions and contrib modules. Especially this commit is required
for upcoming WAL compression feature so that the WAL reader facility can
decompress the WAL data by using pglz_decompress.

Michael Paquier, reviewed by me.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/40bede5477bb5bce98ce9548841cb414634c26f7

Modified Files
--------------
src/backend/access/heap/tuptoaster.c  |   87 +++-
src/backend/utils/adt/Makefile        |    4 +-
src/backend/utils/adt/pg_lzcompress.c |  779 ---------------------------------
src/common/Makefile                   |    3 +-
src/common/pg_lzcompress.c            |  778 ++++++++++++++++++++++++++++++++
src/include/common/pg_lzcompress.h    |   91 ++++
src/include/utils/pg_lzcompress.h     |  112 -----
src/tools/msvc/Mkvcbuild.pm           |    3 +-
src/tools/pgindent/typedefs.list      |    1 -
9 files changed, 940 insertions(+), 918 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


view thread (8+ messages)

Message-ID: <E1YKhe0-0007ng-0n@gemulon.postgresql.org>
Permalink:  ../E1YKhe0-0007ng-0n@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1YKhe0-0007ng-0n@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: fujii@postgresql.org
  Subject: Re: pgsql: Move pg_lzcompress.c to src/common.
  In-Reply-To: <E1YKhe0-0007ng-0n@gemulon.postgresql.org>
  References: <E1YKhe0-0007ng-0n@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