X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id D796030DC9C for ; Wed, 11 Jun 2003 14:51:17 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 15243-06 for ; Wed, 11 Jun 2003 11:51:07 -0300 (ADT) Received: from THOR.goeci.com (unknown [66.28.220.99]) by svr1.postgresql.org (Postfix) with ESMTP id 0C61930DEC2 for ; Wed, 11 Jun 2003 11:51:07 -0300 (ADT) Received: by THOR.goeci.com with Internet Mail Service (5.5.2653.19) id ; Wed, 11 Jun 2003 10:51:07 -0400 Message-ID: <2D92FEBFD3BE1346A6C397223A8DD3FC092310@THOR.goeci.com> From: Murthy Kambhampaty To: 'Michael A Nachbaur' , pgsql-admin@postgresql.org Subject: Re: Syncing DBs prior to RServ replication Date: Wed, 11 Jun 2003 10:51:05 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Archive-Number: 200306/104 X-Sequence-Number: 9095 I think you'd benefit from a two-stage Rsync (this was discussed on this list in the past few months): 1. Rsync the $PGDATA cluster from the "hot" server to the "standby" server, with the postmaster running 2. Stop the postmaster and perform the same rsync again (this will take only a few seconds on how much time elapses between the completion of the first stage and postmaster shutdown; 5G of data should take less than 5 minutes to Rsync over if you're running Fast Ethernet or better). Start the postmaster on both servers, and do your Rserv thing. (I don't use Rserv, so I haven't tested this, but it sounds like you don't need the servers to have identical states, so ...) Cheers, Murthy >-----Original Message----- >From: Michael A Nachbaur [mailto:mike@nachbaur.com] >Sent: Monday, June 09, 2003 18:25 >To: pgsql-admin@postgresql.org >Subject: [ADMIN] Syncing DBs prior to RServ replication > > >I'm looking at syncronizing two database servers with RServ=20 >(production / "hot=20 >standby"), and I'm trying to figure out a way to get the=20 >initial database on=20 >the slave server syncronized with the master. > >Normally, I would 1) turn off all clients, 2) dump the=20 >database from the=20 >master, 3) restore it into the slave, 4) turn clients back on, and 5)=20 >replicate regularly. > >Unfortunately I'm running the master in a production environment where=20 >anything more than 5 minutes of downtime is a really "Bad=20 >Thing=AE". The=20 >database dump is about 5G, and so leaving the master down for=20 >that entire=20 >time isn't possible. Is there a recommended way for=20 >performing such a "sync"=20 >without any lengthy downtime? > >I'm guessing I could start my dump, and then immediately=20 >afterward create the=20 >replication tables in the master. Since the dump is=20 >transactional (is it?),=20 >it shouldn't include the replication tables or the replication=20 >"snapshot"=20 >information in it's dump, and by the time I finally finish=20 >importing the dump=20 >in the new server, I should be able to perform the replication=20 >and pick up=20 >all the new / changed records since I started the DB dump. > >Will this work? Is there a better recommended way? Thanks. > >--=20 >Michael A Nachbaur > > >---------------------------(end of=20 >broadcast)--------------------------- >TIP 3: if posting/reading through Usenet, please send an appropriate >subscribe-nomail command to majordomo@postgresql.org so that your >message can get through to the mailing list cleanly >