Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 36EF99FB276 for ; Sun, 29 Oct 2006 10:58:36 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 54946-01 for ; Sun, 29 Oct 2006 10:58:32 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from main2.mycybernet.net (main2.mycybernet.net [209.222.63.140]) by postgresql.org (Postfix) with ESMTP id 34FBE9FB210 for ; Sun, 29 Oct 2006 10:58:32 -0400 (AST) Received: from 227-54-222-209.mycybernet.net ([209.222.54.227] helo=phlogiston.dydns.org) by main2.mycybernet.net with esmtp (Exim 4.62) (envelope-from ) id 1GeC6m-0005vJ-FF for pgsql-performance@postgresql.org; Sun, 29 Oct 2006 09:57:56 -0500 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id 470BD41A2; Sun, 29 Oct 2006 09:58:25 -0500 (EST) Date: Sun, 29 Oct 2006 09:58:25 -0500 From: Andrew Sullivan To: pgsql-performance@postgresql.org Subject: Re: VACUUMs take twice as long across all nodes Message-ID: <20061029145825.GB14585@phlogiston.dyndns.org> References: <20061026095827.9e85e1c0.gdh@laterooms.com> <20196.1161874041@sss.pgh.pa.us> <20061026160609.5e94e581.gdh@laterooms.com> <20061026191728.GD26892@nasby.net> <20061026213556.174bd7b5.gdh@laterooms.com> <20061026220937.GA6866@phlogiston.dyndns.org> <20061027102025.8183c5d9.gdh@laterooms.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061027102025.8183c5d9.gdh@laterooms.com> User-Agent: Mutt/1.5.9i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.237 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200610/600 X-Sequence-Number: 21729 Ok, I see Tom has diagnosed your problem. Here are more hints anyway: On Fri, Oct 27, 2006 at 10:20:25AM +0100, Gavin Hamill wrote: > > table bloat in various slony-related tables. > > I know it takes longer, I know it blocks. It's never been a problem The problem from a VACUUM FULL is that its taking longer causes the vacuums on (especially) pg_listen and sl_log_[n] to be unable to recover as many rows (because there's an older transaction around). This is a significant area of vulnerability in Slony. You really have to readjust your vacuum assumptions when using Slony. > > 3. Your backups "from the slave" aren't done with pg_dump, > > right? > > Em, they are indeed. I assumed that MVCC would ensure I got a > consistent snapshot from the instant when pg_dump began. Am I wrong? That's not the problem. The problem is that when you restore the dump of the slave, you'll have garbage. Slony fools with the catalogs on the replicas. This is documented in the Slony docs, but probably not in sufficiently large-type bold italics in red with the tag set as would be appropriate for such a huge gotcha. Anyway, don't use pg_dump on a replica. There's a tool that comes with slony that will allow you to take consistent, restorable dumps from replicas if you like. (And you might as well throw away the dumpfiles from the replicas that you have. They won't work when you restore them.) A -- Andrew Sullivan | ajs@crankycanuck.ca "The year's penultimate month" is not in truth a good way of saying November. --H.W. Fowler