pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nick Fankhauser <nickf@ontko.com>
To: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Database is slow, vacuum hangs
Date: Fri, 1 Mar 2002 15:44:39 -0500
Message-ID: <NEBBLAAHGLEEPCGOBHDGCEIIEHAA.nickf@ontko.com> (raw)

Hi-

This morning, my database suddenly got very slow. I had been testing an
import process, so I had loaded, deleted, and reloaded about 140MB of data
several times. After the last reload, I noticed that the database was very
slow. Queries that normally executed in seconds didn't return after several
minutes. I don't know if they ever would have returned results, as I
cancelled after about 5 minutes, so the database might have been completely
locked.

I decided to delete all of the data, do a vacuum, and then reload one more
time.

The deletes were slow, but worked, so the tables are all empty now. I
started the vacuum and let it run for 4 hours while I did other work & it
never came back. During this time, I noticed that two postmaster processes
were constantly running- each taking up almost exactly half of the CPU time.
There was no disk activity. After I canceled the vacuum, the two postmaster
processes remained and continued to use all of the CPU time. (they're still
there.)

postgres.log doesn't contain any new messages.

I guess the obvious next step is to restart postgres, but I don't want to
blow away any evidence.

Can anyone suggest tests I should do to learn what happened before trying a
restart?

I'm running PGSQL 7.1.3 on Debian Linux 2.4.14

Thanks-

-Nick

--------------------------------------------------------------------------
Nick Fankhauser  nickf@ontko.com  Phone 1.765.935.4283  Fax 1.765.962.9788
Ray Ontko & Co.     Software Consulting Services     http://www.ontko.com/




view thread (4+ messages)  latest in thread

Message-ID: <NEBBLAAHGLEEPCGOBHDGCEIIEHAA.nickf@ontko.com>
Permalink:  ../NEBBLAAHGLEEPCGOBHDGCEIIEHAA.nickf@ontko.com/
Also on:    postgresql.org/message-id/NEBBLAAHGLEEPCGOBHDGCEIIEHAA.nickf@ontko.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 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-admin@postgresql.org
  Cc: nickf@ontko.com
  Subject: Re: Database is slow, vacuum hangs
  In-Reply-To: <NEBBLAAHGLEEPCGOBHDGCEIIEHAA.nickf@ontko.com>
  References: <NEBBLAAHGLEEPCGOBHDGCEIIEHAA.nickf@ontko.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