Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 306BD1337B5C for ; Wed, 24 Nov 2010 02:07:58 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 16206-08 for ; Wed, 24 Nov 2010 06:07:51 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id E2F351336B42 for ; Wed, 24 Nov 2010 02:07:50 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id oAO67nSg006421; Wed, 24 Nov 2010 01:07:49 -0500 (EST) To: Elliot Chance cc: pgsql-admin@postgresql.org Subject: Re: pg_dump and XID limit In-reply-to: References: Comments: In-reply-to Elliot Chance message dated "Wed, 24 Nov 2010 13:18:28 +1100" Date: Wed, 24 Nov 2010 01:07:49 -0500 Message-ID: <6420.1290578869@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201011/206 X-Sequence-Number: 36172 Elliot Chance writes: > This is a hypothetical problem but not an impossible situation. Just curious about what would happen. > Lets say you have an OLTP server that keeps very busy on a large database. In this large database you have one or more tables on super fast storage like a fusion IO card which is handling (for the sake of argument) 1 million transactions per second. > Even though only one or a few tables are using almost all of the IO, pg_dump has to export a consistent snapshot of all the tables to somewhere else every 24 hours. But because it's such a large dataset (or perhaps just network congestion) the daily backup takes 2 hours. > Heres the question, during that 2 hours more than 4 billion transactions could of occurred - so what's going to happen to your backup and/or database? The DB will shut down to prevent wraparound once it gets 2 billion XIDs in front of the oldest open snaphot. regards, tom lane