Re: proposal: additional error fields

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: proposal: additional error fields
Дата
Msg-id CA+TgmoZNP9qPf9NUGRsOC0q1mnbMPAkDeu00Sd2ir_+zR4Q=Sw@mail.gmail.com
обсуждение исходный текст
Ответ на proposal: additional error fields  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: proposal: additional error fields  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
On Tue, May 1, 2012 at 8:21 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
> I have to goals for 9.3. First goal is plpgsql_check_function, second
> goal is enhancing ErrorData and error management to support new
> fields: COLUMN_NAME, CONSTRAINT_NAME, CONSTRAINT_SCHEMA, SCHEMA_NAME,
> TABLE_NAME, ROUTINE_NAME, ROUTINE_SCHEMA, TRIGGER_NAME and
> TRIGGER_SCHEMA
>
> previous discussion  is in thread
> http://postgresql.1045698.n5.nabble.com/patch-for-9-2-enhanced-errors-td4470837.html

I have some concerns about the performance cost of this.  Now, you may
think that this is a dumb thing to be concerned about, but some
testing I've done seems to indicate that MOST of the cost of rolling
back a subtransaction is the cost of generating the error string, and
this is why PL/pgsql exception blocks are slow, and I actually do
think that the slowness of PL/pgsql exception blocks is a real issue
for users.  It certainly has been for me, in the past.  So adding 9
more fields that will have to be populated on every error whether
someone cares about them or not is a little scary to me.  If, on the
other hand, we can arrange to generate these fields only when they'll
be used, that would be a lot more appealing, and obviously we might be
able to apply the same technique to the error message itself, which
would be neat, too.

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


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: extending relations more efficiently
Следующее
От: Andres Freund
Дата:
Сообщение: Re: extending relations more efficiently