Re: Moving RestoreBlockImage from xlogreader.c to xlogutils.c - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Moving RestoreBlockImage from xlogreader.c to xlogutils.c
Date
Msg-id 20141225104855.GC31801@alap3.anarazel.de
Whole thread Raw
In response to Re: Moving RestoreBlockImage from xlogreader.c to xlogutils.c  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: Moving RestoreBlockImage from xlogreader.c to xlogutils.c
List pgsql-hackers
On 2014-12-25 08:52:05 +0900, Michael Paquier wrote:
> On Wed, Dec 24, 2014 at 10:51 PM, Fujii Masao <masao.fujii@gmail.com> wrote:
> > Fair enough. Anyway I wait for applying the patch which moves pg_lzcompress.c
> > until we will have reached any consensus about this.
> Just to be clear (after sleeping on it), we still need pglz stuff in
> src/common to offer to the frontends the possibility to uncompress
> block data. My point is simply that we should only provide in the xlog
> reader facility enough data to do operations on them, but not directly
> APIs to operate them. So ISTM that you could still push the patch to
> have pglz in common library to clear the way, and let's use this
> thread to discuss if we want the API to rebuild blocks in the reader
> facility or not.

I think it's a bad idea to move it away - the current placement provides
a API that allows to get at the image data without having to deal with
the low level details. E.g. the in_use, has_image and hole
logic. *Especially* when we add compression that's quite a useful
abstraction. Having it it in place allows us to restructure internals
without disturbing clients - and i don't see any price in this case.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Abhijit Menon-Sen
Date:
Subject: Re: pgaudit - an auditing extension for PostgreSQL
Next
From: Andres Freund
Date:
Subject: Re: hash_create API changes (was Re: speedup tidbitmap patch: hash BlockNumber)