Re: walprotocol.h vs frontends
От | Heikki Linnakangas |
---|---|
Тема | Re: walprotocol.h vs frontends |
Дата | |
Msg-id | 4E494352.3000809@enterprisedb.com обсуждение исходный текст |
Ответ на | Re: walprotocol.h vs frontends (Magnus Hagander <magnus@hagander.net>) |
Ответы |
Re: walprotocol.h vs frontends
|
Список | pgsql-hackers |
On 15.08.2011 18:54, Magnus Hagander wrote: > On Mon, Aug 15, 2011 at 16:53, Tom Lane<tgl@sss.pgh.pa.us> wrote: >> Magnus Hagander<magnus@hagander.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
В списке pgsql-hackers по дате отправления: