Re: FATAL: lock AccessShareLock on object 0/1260/0 is already held

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: FATAL: lock AccessShareLock on object 0/1260/0 is already held
Дата
Msg-id CA+TgmoZySJcokj4ywqoAcxqgQ1dwqemBqi-Xe871K-MBt3R8ZA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: FATAL: lock AccessShareLock on object 0/1260/0 is already held  (daveg <daveg@sonic.net>)
Ответы Re: FATAL: lock AccessShareLock on object 0/1260/0 is already held
Список pgsql-hackers
On Wed, Sep 7, 2011 at 4:22 PM, daveg <daveg@sonic.net> wrote:
> Yes, we make extensive use of advisory locks. That was my thought too when
> Robert mentioned session level locks.
>
> I'm happy to add any additional instrumentation, but my client would be
> happier to actually run it if there was a way to recover from this without
> an unplanned outage. Is there something I can do when the patch detects the
> problem to be able to continue without a restart?

Well, basically, you want to do the same thing that LockRelease()
would do - remove the PROCLOCK from the SHM_QUEUE and delete it from
the hash table, adjusting the counts in the LOCK object as
appropriate.  If you just ignore the failure, you'll get the "blah
blah blah is already held" messages you were having before.

Tom's right to be skeptical of my theory, because it would require a
CHECK_FOR_INTERRUPTS() outside of a transaction block in one of the
pathways that use session-level locks, and I can't find one.

OTOH, I'm skeptical of the theory that this involves userlocks,
because this whole thread started because of a complaint about lock
0/1260/0 already being held.  That ain't no userlock.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: daveg
Дата:
Сообщение: Re: FATAL: lock AccessShareLock on object 0/1260/0 is already held
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [PATCH] Log crashed backend's query (activity string)