Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 6549F1337B5D for ; Sat, 6 Nov 2010 15:22:42 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 38500-06 for ; Sat, 6 Nov 2010 18:22:35 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp-out.neti.ee (smtp-out.neti.ee [194.126.126.39]) by mail.postgresql.org (Postfix) with ESMTP id 355301337B55 for ; Sat, 6 Nov 2010 15:22:35 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by vm-relay4.estpak.ee (Postfix) with ESMTP id D7C226C; Sat, 6 Nov 2010 20:22:32 +0200 (EET) X-Virus-Scanned: Debian amavisd-new at vm-relay4.estpak.ee Received: from smtp-out.neti.ee ([127.0.0.1]) by localhost (vm-relay4.estpak.ee [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CjQiC5pDn+UT; Sat, 6 Nov 2010 20:22:29 +0200 (EET) Received: from NETI-Relayhost2.estpak.ee (neti-relayhost2.estpak.ee [88.196.174.199]) by vm-relay4.estpak.ee (Postfix) with ESMTP id CF6416A; Sat, 6 Nov 2010 20:22:29 +0200 (EET) Received-SPF: None (no SPF record) identity=mailfrom; client-ip=90.190.7.15; helo=[127.0.0.1]; envelope-from=hannu@2ndquadrant.com; receiver=dimitri@2ndquadrant.fr X-SMTP-Auth-NETI-Businessmail: no Subject: Re: Simplifying replication From: Hannu Krosing To: Dimitri Fontaine Cc: Josh Berkus , postgres hackers In-Reply-To: References: <4CBCE356.2080703@agliodbs.com> <1288996741.2313.370.camel@hvost> Content-Type: text/plain; charset="UTF-8" Date: Sat, 06 Nov 2010 20:22:16 +0200 Message-ID: <1289067736.2313.1896.camel@hvost> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.419 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FS_REPLICA=3.599, SARE_SPEC_REPLICA=0.72 X-Spam-Level: ** X-Archive-Number: 201011/271 X-Sequence-Number: 173414 On Sat, 2010-11-06 at 18:02 +0100, Dimitri Fontaine wrote: > Hannu Krosing writes: > > To make pg_basebackup.py self-sufficient it should also open 2nd > > connection to the same master and make sure that all WAL files are > > copied for the duration of base copy. > > Excellent idea, will make that happen soon'ish. Unitil I learned better, I thought that this is how SR is supposed to works ;) btw, as next step you could backport this to 8.x and have most of the benefits of SR. It should not be very hard to keep track of wal position inside a pl/pythonu function and send one or more records back in form of (walfile_name text, start_pos int, data bytea) and then call this function from client every second to keep possible data loss down to 1 sec. this lets you set up warm standby with nothing more than a postgresql superuser access to master (assuming right defaults in postgresql conf). -- ------- Hannu Krosing PostgreSQL Infinite Scalability and Preformance Consultant PG Admin Book: http://www.2ndQuadrant.com/books/