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 EB86B30E689 for ; Fri, 20 Jun 2003 18:08:04 +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 87043-01 for ; Fri, 20 Jun 2003 15:07:51 -0300 (ADT) Received: from dbdevel.sunwave.net (h64-141-16-15.sunwave.net [64.141.16.15]) by svr1.postgresql.org (Postfix) with ESMTP id 6EA1130E446 for ; Fri, 20 Jun 2003 15:07:48 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by dbdevel.sunwave.net (Postfix) with ESMTP id 9D7AC178008; Fri, 20 Jun 2003 14:07:47 -0400 (EDT) From: Michael A Nachbaur To: Murthy Kambhampaty , pgsql-admin@postgresql.org Subject: Re: Syncing DBs prior to RServ replication Date: Fri, 20 Jun 2003 11:07:47 -0700 User-Agent: KMail/1.5 References: <2D92FEBFD3BE1346A6C397223A8DD3FC092310@THOR.goeci.com> In-Reply-To: <2D92FEBFD3BE1346A6C397223A8DD3FC092310@THOR.goeci.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200306201107.47504.mike@nachbaur.com> X-Archive-Number: 200306/275 X-Sequence-Number: 9266 Just a note to everyone. I finally managed to scrape enough time out of my= =20 tasklist (by staying late) so I could try this out. Besides some difficult= y=20 with having a RedHat 7.1 / PGSQL 7.2 box on one end and a Mandrake 9.1 /=20 PGSQL 7.3 box on the other end, everything worked without a hitch. Thanks for the suggestion! On Wednesday 11 June 2003 07:51 am, Murthy Kambhampaty wrote: > 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" serve= r, > 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 u= se > 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 > >(production / "hot > >standby"), and I'm trying to figure out a way to get the > >initial database on > >the slave server syncronized with the master. > > > >Normally, I would 1) turn off all clients, 2) dump the > >database from the > >master, 3) restore it into the slave, 4) turn clients back on, and 5) > >replicate regularly. > > > >Unfortunately I'm running the master in a production environment where > >anything more than 5 minutes of downtime is a really "Bad > >Thing=AE". The > >database dump is about 5G, and so leaving the master down for > >that entire > >time isn't possible. Is there a recommended way for > >performing such a "sync" > >without any lengthy downtime? > > > >I'm guessing I could start my dump, and then immediately > >afterward create the > >replication tables in the master. Since the dump is > >transactional (is it?), > >it shouldn't include the replication tables or the replication > >"snapshot" > >information in it's dump, and by the time I finally finish > >importing the dump > >in the new server, I should be able to perform the replication > >and pick up > >all the new / changed records since I started the DB dump. > > > >Will this work? Is there a better recommended way? Thanks. > > > >-- > >Michael A Nachbaur > > > > > >---------------------------(end of > >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 > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster --=20 Michael A Nachbaur