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

Поиск
Список
Период
Сортировка
От Christian Kruse
Тема Re: Patch: show relation and tuple infos of a lock to acquire
Дата
Msg-id 20140317105004.GA1726@defunct.ch
обсуждение исходный текст
Ответ на Re: Patch: show relation and tuple infos of a lock to acquire  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: Patch: show relation and tuple infos of a lock to acquire  (Amit Kapila <amit.kapila16@gmail.com>)
Re: Patch: show relation and tuple infos of a lock to acquire  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
Hi Amit,

I've been ill the last few days, so sorry for my late response.

> I have updated the patch to pass TID and operation information in
> error context and changed some of the comments in code.
> Let me know if the added operation information is useful, else
> we can use better generic message in context.

I don't think that this fixes the translation guideline issues brought
up by Robert. This produces differing strings for the different cases
as well and it also passes in altering data directly to the error
string.

It also may produce error messages that are really weird. You
initialize the string with "while attempting to ". The remaining part
of the function is covered by if()s which may lead to error messages
like this:

„while attempting to “
„while attempting to in relation "public"."xyz" of database "abc"“
„while attempting to in database "abc"“

Although this may not be very likely (because
ItemPointerIsValid(&(info->ctid))) should in this case not return
false).

Attached you will find a new version of this patch; it slightly
violates the translation guidelines as well: it assembles an error
string (but it doesn't pass in altering data like ctid or things like
that). I simply couldn't think of a nice solution without doing so,
and after looking through the code there are a few cases
(e.g. CheckTableNotInUse()) where this is done, too. If we insist of
having complete strings in this case we would have to have 6 * 3 * 2
error strings in the code.

Best regards,

--
 Christian Kruse               http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


Вложения

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

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: gaussian distribution pgbench
Следующее
От: Thom Brown
Дата:
Сообщение: Various typos