Re: Patch: show relation and tuple infos of a lock to acquire

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Patch: show relation and tuple infos of a lock to acquire
Дата
Msg-id CAA4eK1+yJQQUyXsFs3uu1T2X04w6Sc3SeSR5QEWbxmGJGP1MbQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Patch: show relation and tuple infos of a lock to acquire  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: Patch: show relation and tuple infos of a lock to acquire  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Tue, Mar 18, 2014 at 3:38 AM, Alvaro Herrera
<alvherre@2ndquadrant.com> wrote:
> Here's an adjusted version.  In this one, the extra info is not used to
> construct a string from pieces, but instead it puts it at the end, like
> this:
>
> LOG:  process 18899 still waiting for ShareLock on transaction 697 after 1000.203 ms
> CONTEXT:  while operating on tuple (0,2) in relation "public"."foo" of database "postgres": updating tuple
>
> This way, each part can sensibly be translated.  In fact I did translate
> one instance to test it at work, and it looks good to me:
>
> LOG:  el proceso 22555 adquirió ShareLock en transacción 705 después de 1514.017 ms
> CONTEXT:  mientras se operaba en la tupla (0,2) en la relación "public"."foo" de la base de datos «postgres»:
actualizandotupla 
>
> Now there might be bikeshedding on the exact wording I've chosen for
> each instance of context setup, but I expect it's a fairly minor point
> now.
>
> One remaining issue is that now ConditionalXactLockTableWait doesn't set
> up error context info.

ConditionalXactLockTableWait() is not going to block on lock which
is when this new context will be printed. So I think there is no need
to change it. Is there a case where it will be needed which I am
missing?

>  We could solve this by having a common routine
> that serves both that one and XactLockTableWait (much like
> Do_MultiXactIdWait does), but I'm not sure it's worth the trouble.
> Thoughts?


> Therefore I think the only case worth considering here is when
> database/relation/TID are all defined.  The other cases where there is
> partial information are dead code; and the case where there is nothing
> defined (such as the one in SnapBuildFindSnapshot) is already handled by
> simply not setting up a context at all.

Right. So I think we should just keep one version of message.

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



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

Предыдущее
От: Kouhei Kaigai
Дата:
Сообщение: Re: Triggers on foreign tables
Следующее
От: Atri Sharma
Дата:
Сообщение: Re: Planner hints in Postgresql