Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 0C75064FDA0 for ; Mon, 20 Oct 2008 10:20:54 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 57663-02 for ; Mon, 20 Oct 2008 10:20:47 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by postgresql.org (Postfix) with ESMTP id CC8E5650292 for ; Mon, 20 Oct 2008 10:20:45 -0300 (ADT) Received: from perhan.alvh.no-ip.org (200-126-101-5.bk7-dsl.surnet.cl [200.126.101.5]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id m9KDOfGi006880 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 20 Oct 2008 06:24:44 -0700 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id E160547CBA; Mon, 20 Oct 2008 10:20:35 -0300 (CLST) Date: Mon, 20 Oct 2008 10:20:35 -0300 From: Alvaro Herrera To: Florian Weimer Cc: pgsql-admin@postgresql.org Subject: Re: Strategies for validating WAL-shipping replication Message-ID: <20081020132035.GA4116@alvh.no-ip.org> References: <82hc77dbgz.fsf@mid.bfk.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <82hc77dbgz.fsf@mid.bfk.de> User-Agent: Mutt/1.5.18 (2008-05-17) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Mon, 20 Oct 2008 06:24:45 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.899 tagged_above=0 required=5 tests=FS_REPLICA=1.179, SARE_SPEC_REPLICA=0.72 X-Spam-Level: * X-Archive-Number: 200810/135 X-Sequence-Number: 30591 Florian Weimer wrote: > We've set up WAL-shipping replication on one of our database servers, > and the question is whether it runs correctly. Is there an easy way > to access some tables and see if the data matches (possibly in > single-user mode)? > > Stopping replication and starting the server for real on the replica > means that we have to set up things from scratch, right? (This is a > bit annoying because of the amount of data which has to be copied from > the master.) The OmniTI guys gave a talk some time ago on how they used Solaris ZFS to create a filesystem snapshot, on which they stopped the recovery and started postmaster. This could run queries. The original copy continues running recovery, and whenever you want to "update your slave", you stop the second postmaster, delete the snapshot, and create a new one. Cumbersome ... -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support