From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | Ben-Nes Yonatan <da(at)canaan(dot)co(dot)il> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Weird lock or bug maybe? |
Date: | 2005-08-05 10:54:30 |
Message-ID: | 42F34566.30902@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Ben-Nes Yonatan wrote:
> If ill query: DELETE FROM table1; it will just get stuck...
> If ill try: DELETE FROM table1 WHERE table1_id=1523; it will work in
> most cases but for some rows it will just get stuck!
> Anyone know anything about this weird problem?
> By the way when I restarted the DB server I was able to delete the
> current row which stucked the process but then I got stuck at some other
> row at the table....
What do you mean by "get stuck"?
Are you sure it's not scanning one of the tables to check references
before deleting? If you don't have an index on the table in question
then PG will have to scan the entire table.
To check for locks, try:
SELECT * FROM pg_stat_activity;
SELECT * FROM pg_locks;
Let's see what's actually happening.
--
Richard Huxton
Archonet Ltd
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Huxton | 2005-08-05 10:55:36 | Re: Weird lock or bug maybe? |
Previous Message | Ben-Nes Yonatan | 2005-08-05 09:37:47 | Weird lock or bug maybe? |