Re: reading WAL files in python

Поиск
Список
Период
Сортировка
От Erik Jones
Тема Re: reading WAL files in python
Дата
Msg-id CE398E79-FFEF-4219-9606-F5D28AD2E665@myemma.com
обсуждение исходный текст
Ответ на reading WAL files in python  (Gerardo Herzig <gherzig@fmed.uba.ar>)
Ответы Re: reading WAL files in python  (gherzig@fmed.uba.ar)
Список pgsql-sql
On Jan 7, 2008, at 7:19 AM, Gerardo Herzig wrote:

> Hi all. Im having some fun trying to write my own replication
> system using python. I will use the postgres own WAL archiving to
> write the files,  then my app will read them and do some stuff. As
> im not a C programmer, im stuck in the mission of reading the
> binary files.
>
> I guess im needing to know the internals of how wals archives are,
> how big the buffer has to be, in order to have a complete sql command.
>
> Can someone point some advice?
> I was trying to understad src/backend/access/transam/xlog.c, but
> seems too difficult to me :(

The biggest problem with what you're wanting to do here is that the
data written to the WALL archives isn't going to be at all easily
translatable into SQL statements.  AFAIK, the WAL data records on-
disk file changes, i.e. it's strictly a binary mode scenario.  As
someone has already suggested, if you want to learn more about
Postgres and Python, look at Skytools.  I'm not just saying to use
it, read the code and, if you like, offer help with patches.

Erik Jones

DBA | Emma®
erik@myemma.com
800.595.4401 or 615.292.5888
615.292.0777 (fax)

Emma helps organizations everywhere communicate & market in style.
Visit us online at http://www.myemma.com





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

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: Cheers for DISTINCT ON
Следующее
От: gherzig@fmed.uba.ar
Дата:
Сообщение: Re: reading WAL files in python