walprotocol.h vs frontends

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема walprotocol.h vs frontends
Дата
Msg-id CABUevEzNxAHFp8=mFJxDWsqECBJZNFdsmvKVM4mi3C1D3acpkw@mail.gmail.com
обсуждение исходный текст
Ответы Re: walprotocol.h vs frontends  (Peter Geoghegan <peter@2ndquadrant.com>)
Re: walprotocol.h vs frontends  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I'm trying to make my streaming log receiver work properly with 9.1,
and have come across a couple of things. The first one that's causing
trouble is that the definition of the protocol is currently in
walprotocol.h, which is not include:able in a frontend application.
AFAICT, this is because it includes utils/timestamp.h, which doesn't
work. AFAICT, this means that anybody other than our own backend who
wants to talk our replication protocol has to copy the specific struct
defines they want in their own code. This seems like a really bad
idea. (In my case, it's the StandbyReplyMessage that I need, so I can
make my client not get killed by the default settings for timeout)

The basic reason for this is that we're putting TimestampTz fields in
the protocol. This also means that the protocol actually changes
definition depending on if the server is compiled with integer or
float timestamps. While the replication itself breaks if these are
different, this seems like a bad thing to expose in the protocol. It
also makes life a lot harder on third party tools.

Any ideas on what to do with this, other than me copying the struct
defs and changing them to int64 (which does work in my lab, but seems
like a horrible kludge).

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: pg_stat_replication vs StandbyReplyMessage
Следующее
От: Joachim Wieland
Дата:
Сообщение: Re: synchronized snapshots