Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 537A72E0307 for ; Mon, 7 Jan 2008 09:16:14 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 29149-01-3 for ; Mon, 7 Jan 2008 09:16:02 -0400 (AST) Received: from mail.fmed.uba.ar (mail.fmed.uba.ar [157.92.152.1]) by postgresql.org (Postfix) with ESMTP id 31AFC2E01A9 for ; Mon, 7 Jan 2008 09:16:08 -0400 (AST) Received: from [157.92.155.58] (mailbis [157.92.155.58]) by mail.fmed.uba.ar (Postfix) with ESMTP id A812511C304 for ; Mon, 7 Jan 2008 11:16:01 -0200 (ARST) Message-ID: <478226FB.6030306@fmed.uba.ar> Date: Mon, 07 Jan 2008 10:19:55 -0300 From: Gerardo Herzig User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: reading WAL files in python Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/22 X-Sequence-Number: 29876 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 :( Thanks! Gerardo