Re: Moving RestoreBlockImage from xlogreader.c to xlogutils.c

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Moving RestoreBlockImage from xlogreader.c to xlogutils.c
Date: 2014-12-25 10:48:55
Message-ID: 20141225104855.GC31801@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)fujii(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-12-25 11:07:57 Re: hash_create API changes (was Re: speedup tidbitmap patch: hash BlockNumber)
Previous Message Abhijit Menon-Sen 2014-12-25 10:42:59 Re: pgaudit - an auditing extension for PostgreSQL