Re: database locks

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: database locks
Дата
Msg-id AFCCBB403D7E7A4581E48F20AF3E5DB201B4AE62@EXADV1.host.magwien.gv.at
обсуждение исходный текст
Ответ на database locks  (Tomasz Rakowski <mourawi@yahoo.com>)
Список pgsql-general
Tomasz Rakowski wrote:
> I'm facing frustrating problem with locking in
> postgres server. I have application which do update
> one table few thousands time each minute. From time to
> time call to database is locked and is waiting for something
> (In pgAdmin3 in 'Server Status' window in 'Lock' tab I
> can see UPDATE statement siting there for hours... and
> usually it is the the only lock! ) At the same time I
> can connect to database from other applications
> (including pgAdmin3) and do any query on that table.

SELECT statements are never blocked by row locks, so the
latter is not surprising.

The first step is probably to find out what holds the lock for
such a long time:

When the hang occurs, do a 'SELECT * FROM pg_locks', that should
show you which backend is waiting for the lock and which backend
holds it. If you have stats_command_string set to on, you will
see the executing statement in pg_stat_activity.

Yours,
Laurenz Albe

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

Предыдущее
От: "Albe Laurenz"
Дата:
Сообщение: Re: quoted identifier behaviour
Следующее
От: Douglas McNaught
Дата:
Сообщение: Re: Automating access grants