Re: pgsql: Move pg_lzcompress.c to src/common. - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Move pg_lzcompress.c to src/common.
Date
Msg-id 25733.1419532312@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql: Move pg_lzcompress.c to src/common.  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: pgsql: Move pg_lzcompress.c to src/common.  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-committers
Andres Freund <andres@2ndquadrant.com> writes:
> On 2014-12-25 23:46:52 +0900, Michael Paquier wrote:
>> Urgh.. Would that mean keeping a local copy of SET_VARSIZE_4B_C and
>> VARSIZE_4B if this hack is not used? Looking at the git history, I am
>> seeing similar things in 2008 where pg_crc stuff was moved to src/port
>> (5c9c08d).

> Surely not. It seems like a much better idea to not have lzcompress deal
> with varlena at all but pass that responsibility one layer upwards. That
> shouldn't be very hard.

All files in src/common should be using the coding pattern

#ifndef FRONTEND
#include "postgres.h"
#else
#include "postgres_fe.h"
#endif

and as noted, it's going to take additional refactoring to make it
possible to do that in pg_lzcompress.  In view of all the potentially
unportable stuff Andres committed today, we need the buildfarm to be
at full strength; so I've reverted this commit until it can be worked
out a bit better.

            regards, tom lane


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Temporarily revert "Move pg_lzcompress.c to src/common."
Next
From: Andres Freund
Date:
Subject: pgsql: Blindly fix a dtrace probe in lwlock.c for a removed local varia