pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Sullivan <ajs@crankycanuck.ca>
To: pgsql-performance@postgresql.org
Subject: Re: VACUUMs take twice as long across all nodes
Date: Sun, 29 Oct 2006 09:58:25 -0500
Message-ID: <20061029145825.GB14585@phlogiston.dyndns.org> (raw)
In-Reply-To: <20061027102025.8183c5d9.gdh@laterooms.com>
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>

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
<blink> 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



view thread (17+ messages)  latest in thread

Message-ID: <20061029145825.GB14585@phlogiston.dyndns.org>
Permalink:  ../20061029145825.GB14585@phlogiston.dyndns.org/
Also on:    postgresql.org/message-id/20061029145825.GB14585@phlogiston.dyndns.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: ajs@crankycanuck.ca
  Subject: Re: VACUUMs take twice as long across all nodes
  In-Reply-To: <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> <20061029145825.GB14585@phlogiston.dyndns.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox