pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Decibel! <decibel@decibel.org>
Cc: Ruben Rubio <ruben@rentalia.com>
Cc: Bill Moran <wmoran@collaborativefusion.com>
Cc: Chris Mair <chris@1006.org>
Cc: pgsql-performance@postgresql.org
Subject: Re: [Solved] Postgres performance problem
Date: Thu, 30 Aug 2007 19:07:20 +0100
Message-ID: <46D70758.6010507@archonet.com> (raw)
In-Reply-To: <20070830173151.GP38801@decibel.org>
References: <46D2B879.6010308@rentalia.com>
	<46D2C4AF.8090501@1006.org>
	<20070827092935.be819c94.wmoran@collaborativefusion.com>
	<46D67730.10505@rentalia.com>
	<46D692CC.7010907@rentalia.com>
	<20070830173151.GP38801@decibel.org>

Decibel! wrote:
> On Thu, Aug 30, 2007 at 11:50:04AM +0200, Ruben Rubio wrote:
>> As you may know, I do a vacuum full and a reindex database each day. I
>> have logs that confirm that its done and I can check that everything was
>>  fine.
>>
>> So, this morning, I stopped the website, I stopped database, started it
>> again. (I was around 200  days without restarting), then I vacuum
>> database and reindex it (Same command as everyday) . Restart again, and
>> run again the website.
>>
>> Now seems its working fine. But I really does not know where is the
>> problem. Seems vacuum its not working fine?  Maybe database should need
>> a restart? I really don't know.
> 
> No, it sounds to me like you just weren't vacuuming aggressively enough
> to keep up with demand.

Actually , I think it sounds like a stray long-lived transaction.

Ruben - vacuum can't recover rows if another transaction might be able 
to see them. So, if you have a connection that issues BEGIN and sits 
there for 200 days you can end up with a lot of bloat in your database.

Now, there's no way to prove that since you've restarted the 
database-server, but keep an eye on it.

-- 
   Richard Huxton
   Archonet Ltd



view thread (36+ messages)  latest in thread

Message-ID: <46D70758.6010507@archonet.com>
Permalink:  ../46D70758.6010507@archonet.com/
Also on:    postgresql.org/message-id/46D70758.6010507@archonet.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: dev@archonet.com, decibel@decibel.org, ruben@rentalia.com, wmoran@collaborativefusion.com, chris@1006.org
  Subject: Re: [Solved] Postgres performance problem
  In-Reply-To: <46D70758.6010507@archonet.com>

* 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