Re: SSI error messages

Поиск
Список
Период
Сортировка
Искать
От
Alvaro Herrera
Тема
Re: SSI error messages
Дата
Msg-id
1311967563-sup-6222@alvh.no-ip.org
Ответ на
Re: SSI error messages (Peter Eisentraut)
Список
Дерево обсуждения
Re: SSI error messages "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: SSI error messages Tom Lane <tgl@sss.pgh.pa.us>
Excerpts from Peter Eisentraut's message of vie jul 29 14:46:20 -0400 2011:
> On lör, 2011-07-16 at 21:55 +0300, Heikki Linnakangas wrote:
> > I think I would prefer something like this:
> > 
> > ERROR:  could not serialize access due to read/write dependencies
> > among 
> > transactions
> > DETAIL: Reason code: %s
> > HINT:  The transaction might succeed if retried.
> > 
> > Where %s gets the current detail field, untranslated, like:
> > 
> > Canceled on commit attempt with conflict in from prepared pivot.
> 
> Do you have an idea how to address this case:

Call sprintf to expand the %u before ereport()?

> @@ -3865,7 +3865,7 @@ CheckForSerializableConflictOut(bool visible, Relation relation,
>                 ereport(ERROR,
>                         (errcode(ERRCODE_T_R_SERIALIZATION_FAILURE),
>                          errmsg("could not serialize access due to read/write dependencies among transactions"),
> -                        errdetail_internal("Canceled on conflict out to old pivot %u.", xid),
> +                        errdetail("Reason code: %s.", "canceled on conflict out to old pivot %u", xid),  // XXX bogus
>                       errhint("The transaction might succeed if retried.")));

-- 
Álvaro Herrera 
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

В списке pgsql-hackers по дате отправления
От: Alvaro Herrera
Дата:
От: Tom Lane
Дата:
Сообщение: Re: SSI error messages
FAQ