Re: Weird lock or bug maybe?

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Weird lock or bug maybe?
Дата
Msg-id 42F34566.30902@archonet.com
обсуждение исходный текст
Ответ на Weird lock or bug maybe?  (Ben-Nes Yonatan <da@canaan.co.il>)
Ответы Re: Weird lock or bug maybe?  (Ben-Nes Yonatan <nimrod@canaan.co.il>)
Список 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

В списке pgsql-general по дате отправления:

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Does preparing statements other than selects help performance?
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Weird lock or bug maybe?