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

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Moving RestoreBlockImage from xlogreader.c to xlogutils.c
Date: 2014-12-24 13:16:18
Message-ID: CAHGQGwGLpTAaMmbRs=cCJ39Kh1WJvWrYdiSMaV4XPO634Hg8YQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Dec 24, 2014 at 9:42 PM, Michael Paquier
<michael(dot)paquier(at)gmail(dot)com> wrote:
> Hi all,
>
> Commit 2c03216d has introduced RestoreBlockImage to restore a page
> from a given decoding state. ISTM that this is a backend-only
> operation but it has been added in xlogreader.c which could be used as
> well by frontend utilities like pg_xlogdump.
> Wouldn't it be better to declare it as a static routine in
> xlogutils.c? If we keep it in xlogreader.c, I think that we should at
> least wrap it with ifndef FRONTEND.
> Thoughts?

If we do this, pg_lzcompress.c doesn't need to be moved to common for
FPW compression patch which we're talking about in other thread. Right?

DecodeXLogRecord() seems also a backend-only, so we should treat it
in the same way as you proposed? Or pg_rewind uses that?

Regards,

--
Fujii Masao

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2014-12-24 13:41:56 Re: Moving RestoreBlockImage from xlogreader.c to xlogutils.c
Previous Message Peter Eisentraut 2014-12-24 13:12:16 Re: pg_basebackup fails with long tablespace paths