Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y48ho-00050T-M2 for pgsql-committers@arkaria.postgresql.org; Thu, 25 Dec 2014 13:43:56 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Y48hn-0001sN-R2 for pgsql-committers@arkaria.postgresql.org; Thu, 25 Dec 2014 13:43:55 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Y48hm-0001sG-RT for pgsql-committers@postgresql.org; Thu, 25 Dec 2014 13:43:54 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y48hj-0004UZ-A6; Thu, 25 Dec 2014 13:43:53 +0000 Received: from intern.anarazel.de (p549F02E4.dip0.t-ipconnect.de [84.159.2.228]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id 24E0A460007; Thu, 25 Dec 2014 14:43:48 +0100 (CET) Date: Thu, 25 Dec 2014 14:43:47 +0100 From: Andres Freund To: Fujii Masao Cc: Fujii Masao , pgsql-committers Subject: Re: pgsql: Move pg_lzcompress.c to src/common. Message-ID: <20141225134347.GF31801@alap3.anarazel.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org On 2014-12-25 22:39:58 +0900, Fujii Masao wrote: > On Thu, Dec 25, 2014 at 8:47 PM, Fujii Masao 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