From: Andres Freund <andres@2ndquadrant.com>
To: Fujii Masao <masao.fujii@gmail.com>
Cc: Fujii Masao <fujii@postgresql.org>
Cc: pgsql-committers <pgsql-committers@postgresql.org>
Subject: Re: pgsql: Move pg_lzcompress.c to src/common.
Date: Thu, 25 Dec 2014 14:43:47 +0100
Message-ID: <20141225134347.GF31801@alap3.anarazel.de> (raw)
In-Reply-To: <CAHGQGwHLeCcC1gdvWUT1Z4HdLdYM8UnY_-+oAkuJpBGLEmc-Ug@mail.gmail.com>
References: <E1Y46tC-0000qW-Qt@gemulon.postgresql.org>
<CAHGQGwHLeCcC1gdvWUT1Z4HdLdYM8UnY_-+oAkuJpBGLEmc-Ug@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
On 2014-12-25 22:39:58 +0900, Fujii Masao wrote:
> On Thu, Dec 25, 2014 at 8:47 PM, Fujii Masao <fujii@postgresql.org> wrote:
> > Move pg_lzcompress.c to src/common.
> >
> > Exposing compression and decompression APIs of pglz makes possible its
> > use by extensions and contrib modules. pglz_decompress contained a call
> > to elog to emit an error message in case of corrupted data. This function
> > is changed to return a status code to let its callers return an error instead.
> >
> > This commit is required for upcoming WAL compression feature so that
> > the WAL reader facility can decompress the WAL data by using pglz_decompress.
>
> Hmm... the buildfarm member prairiedog doesn't like this change. Because
> pg_lzcompress.c uses the macros (like VARSIZE) for varlena datatypes which
> are defined in postgres.h which client-side should not include. ISTM that
> pg_lzcompress.c should be changed to be "varlena-free", in order to push it
> in src/common.
Temporarily this can be solved by including postgres.h the way
e.g. pg_resetxlog does:
/*
* We have to use postgres.h not postgres_fe.h here, because there's so much
* backend-only stuff in the XLOG include files we need. But we need a
* frontend-ish environment otherwise. Hence this ugly hack.
*/
#define FRONTEND 1
#include "postgres.h"
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
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@2ndquadrant.com, masao.fujii@gmail.com, fujii@postgresql.org
Subject: Re: pgsql: Move pg_lzcompress.c to src/common.
In-Reply-To: <20141225134347.GF31801@alap3.anarazel.de>
References: <E1Y46tC-0000qW-Qt@gemulon.postgresql.org> <CAHGQGwHLeCcC1gdvWUT1Z4HdLdYM8UnY_-+oAkuJpBGLEmc-Ug@mail.gmail.com> <20141225134347.GF31801@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