From: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
---|---|
To: | Magnus Hagander <magnus(at)hagander(dot)net> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: walprotocol.h vs frontends |
Date: | 2011-08-15 16:03:30 |
Message-ID: | 4E494352.3000809@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 15.08.2011 18:54, Magnus Hagander wrote:
> On Mon, Aug 15, 2011 at 16:53, Tom Lane<tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Magnus Hagander<magnus(at)hagander(dot)net> writes:
>>> I also ran into a similar problem with some WAL macro definitions that
>>> are in xlog_internal.h. I've moved them to xlogdefs.h in the attached
>>> xlog.diff file. Does that seem ok as well, or should I move them
>>> somewhere else?
>>
>> I don't like the idea of exposing those to frontends, either. What do
>> you actually *need* out of that, and why?
>
> PrevLogSeg - which also brings in XLogSegsPerFile.
> XLogFileName
> XLogFileSize - which brings in XLogSegsPerFile and XLogSegSize
>
> PrevLogSeg should be self explaining, as should xlogfilename.
>
> XLogFileSize is required by XLByteAdvance() which is already in
> xlogdefs.h - so xlogdefs.h actually has a hidden dependency on
> xlog_internal.h here today.
>
> I can certainly separate those out, but it seemed more clean to move
> the whole block they were in.
Perhaps we should change the protocol so that it explicitly says which
file the streamed piece of WAL belongs to. That way a client could write
it to the correct file without knowing about all those macros.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2011-08-15 16:12:36 | Re: walprotocol.h vs frontends |
Previous Message | Steve Singer | 2011-08-15 15:56:39 | Re: walprotocol.h vs frontends |