Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UFt4O-0005cP-FR for pgsql-performance@arkaria.postgresql.org; Wed, 13 Mar 2013 21:18:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UFt4O-000142-09 for pgsql-performance@arkaria.postgresql.org; Wed, 13 Mar 2013 21:18:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UFt4N-00013v-9O for pgsql-performance@postgresql.org; Wed, 13 Mar 2013 21:18:43 +0000 Received: from smtp.01.com ([199.36.142.181]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UFt4K-0007cB-W4 for pgsql-performance@postgresql.org; Wed, 13 Mar 2013 21:18:43 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp-out-1.01.com (Postfix) with ESMTP id 47E5B29417F; Wed, 13 Mar 2013 16:18:39 -0500 (CDT) X-Virus-Scanned: amavisd-new at smtp-out-1.01.com Received: from smtp.01.com ([127.0.0.1]) by localhost (smtp-out-1.01.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id x7y7hh8giFZb; Wed, 13 Mar 2013 16:18:39 -0500 (CDT) Received: from smtp.01.com (localhost.localdomain [127.0.0.1]) by smtp-out-1.01.com (Postfix) with ESMTP id 1B6F5294155; Wed, 13 Mar 2013 16:18:39 -0500 (CDT) Received: from mail-1.01.com (mail.01.com [172.18.30.178]) by smtp-out-1.01.com (Postfix) with ESMTP id 822A829417E; Wed, 13 Mar 2013 16:18:38 -0500 (CDT) Date: Wed, 13 Mar 2013 16:18:38 -0500 (CDT) From: Joshua Berkus To: =?utf-8?Q?Niels_Kristian_Schj=C3=B8dt?= Cc: postgres performance list Message-ID: <1742777165.26321.1363209518274.JavaMail.root@agliodbs.com> In-Reply-To: <90758F5A-C637-4EE8-88B8-EF9AFA5AF576@autouncle.com> Subject: Re: Risk of data corruption/loss? MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.18.31.178] X-Mailer: Zimbra 7.2.1_GA_2790 (ZimbraWebClient - FF3.0 (Linux)/7.2.1_GA_2790) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org Neils, > - Master server with battery back raid controller with 4 SAS disks in > a RAID 0 - so NO mirroring here, due to max performance > requirements. > - Slave server setup with streaming replication on 4 HDD's in RAID > 10. The setup will be done with synchronous_commit=off and > synchronous_standby_names = '' I'd be concerned that, assuming you're making the master high-risk for performance reasons, that the standby would not keep up. > So as you might have noticed, clearly there is a risk of data loss, > which is acceptable, since our data is not very crucial. However, I > have quite a hard time figuring out, if there is a risk of total > data corruption across both server in this setup? E.g. something > goes wrong on the master and the wal files gets corrupt. Will the > slave then apply the wal files INCLUDING the corruption (e.g. an > unfinished transaction etc.), or will it automatically stop > restoring at the point just BEFORE the corruption, so my only loss > is data AFTER the corruption? Well, in general RAID 1 really just protects you from HDD failure, not more subtle types of corruption which occur onboard an HDD. So from that respect, you haven't increased your chances of data corruption at all; if the master loses a disk, it should just stop operating; a simple check that all WALs are 16MB on the standby would do the rest. I'd be more concerned that you're likely to be yanking and completely rebuilding the master server every 4 or 5 months. -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance