Re: Exclusive Locks Taken on User Tables?

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Exclusive Locks Taken on User Tables?
Дата
Msg-id 1194436449.4251.49.camel@ebony.site
обсуждение исходный текст
Ответ на Re: Exclusive Locks Taken on User Tables?  (Marc <pgsql-general@mbreslow.net>)
Список pgsql-general
On Tue, 2007-11-06 at 15:53 -0500, Marc wrote:
> Ok.  I'll keep looking at pg_locks.
>
> My original reason for reaching out to the list was over confusion as
> to when an EXCLUSIVE lock would be taken table level since the
> documentation says this should never happen except to some system
> catalogs.  Is there something missing from the documentation?  I feel
> like that would be a big clue.  Here is what I'm referencing:
> http://www.postgresql.org/docs/8.2/interactive/explicit-locking.html

OK, I see what you mean.

This page:
http://www.postgresql.org/docs/8.2/interactive/view-pg-locks.html
references the section on titled Table-level Locks, rather than
referencing the locking chapter in general.

The docs don't discuss that ExclusiveLock applies to the locktype, not
to the Table in all cases, which could easily be inferred from what is
there. I've had that question before myself.

The tuple level ExclusiveLocks you are seeing are locking only the rows;
the table containing those rows will not be ExclusiveLock-ed.

The docs are correct in what they say about *table-level* (i.e. relation
as referred to by pg_locks) ExclusiveLocks.

I'll submit a patch.

--
  Simon Riggs
  2ndQuadrant  http://www.2ndQuadrant.com


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

Предыдущее
От: Reg Me Please
Дата:
Сообщение: Re: prepared statements suboptimal?
Следующее
От: rihad
Дата:
Сообщение: Re: prepared statements suboptimal?