Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id E4A6E2E3409 for ; Tue, 18 Dec 2007 14:56:01 -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 44930-05 for ; Tue, 18 Dec 2007 14:55:47 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 5B72E2E3079 for ; Tue, 18 Dec 2007 14:55:58 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id lBIItvvv003150; Tue, 18 Dec 2007 13:55:57 -0500 (EST) To: "David F. Skoll" cc: pgsql-admin@postgresql.org Subject: Re: Warm-standby robustness question In-reply-to: <4768081F.90500@roaringpenguin.com> References: <4768081F.90500@roaringpenguin.com> Comments: In-reply-to "David F. Skoll" message dated "Tue, 18 Dec 2007 12:49:19 -0500" Date: Tue, 18 Dec 2007 13:55:57 -0500 Message-ID: <3149.1198004157@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/168 X-Sequence-Number: 27685 "David F. Skoll" writes: > My question is this: If the master database is fairly busy, gets > VACUUMed once a day, etc. can we expect the warm standby server > to work correctly after days/weeks/months/years of log shipping, > or should we periodically take new base backups? I don't think the time period is at issue. Log-shipping should keep the slave a perfect replica of the master (if it doesn't, we have problems anyway). The operational question you need to ask yourself is: if you haven't swapped to the slave lately, how do you know it will work when you need it to? The current backup/restore docs suggest as best practice that you intentionally swap master and slave periodically, ie, fail over to the slave and then re-initialize the master as a new slave. This provides a periodic test that your fail-over mechanisms actually work, and as a bonus gives you a chance for a maintenance window on the ex-master before it's brought up as new slave. regards, tom lane