Re: Delete Problem

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: "surabhi(dot)ahuja" <surabhi(dot)ahuja(at)iiitb(dot)ac(dot)in>
Cc: Michael Fuhr <mike(at)fuhr(dot)org>, Jamie Deppeler <jamie(at)doitonce(dot)net(dot)au>, pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Delete Problem
Date: 2006-07-13 16:07:43
Message-ID: 1152806863.14241.79.camel@state.g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 2006-07-13 at 01:41, surabhi.ahuja wrote:
> even i have seen this problem
>
> i am using postgres 8.0.0
>
> i open psql <dbname>
>
> and there i try to do
> delete from <tab1>
>
> it seems that psql gets stuck.
>
> even after 5 mins or something, no deletion happens.
>
> generally this happens when the disk is nearing to full
>
> cant this be avoided, why does postgres hang.
>

5 minutes does not a hang make. :) It's likely that postgresql hasn't
hung, but is just taking a really long time to complete your request.
Note that the other user got a response back, it just said zero rows
deleted. Which points to index corruption. Which points to broken
hardware. Hardware which should be tested thoroughly to identify any
problem areas, like bad RAM, CPU, hard drive, cabling, power supply, or
misconfigured memory timings et. al.

Your problem is likely a bit different. When the machine just sits
there for 5 or more minutes, the CPUs or hard drives are likely still
busy.

What do you postgresql logs say, if anything?

Some other points:

1: upgrade your postgresql version. The developers work hard for your
benefit. 8.0.8 or so is out. There's LOTS of bug fixes between 8.0.0
and 8.0.8, and if you're running into a bug on 8.0.0 you're wasting your
time trying to figure it out if the fix is already in.

2: Are you running analyze and vacuum regularly? If your disk is often
nearing full but your actual data set isn't that large, that points to a
lack of vacuuming. check your fsm settings as well.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Guy Fraser 2006-07-13 16:34:39 Re: =???UTF-8?Q?re: How to insert .xls files into
Previous Message Scott Marlowe 2006-07-13 15:59:59 Re: db clustering?