From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: additional error fields |
Date: | 2012-05-01 14:25:53 |
Message-ID: | CA+TgmoZNP9qPf9NUGRsOC0q1mnbMPAkDeu00Sd2ir_+zR4Q=Sw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, May 1, 2012 at 8:21 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2012-05-01 14:31:00 | Re: extending relations more efficiently |
Previous Message | Simon Riggs | 2012-05-01 14:22:49 | Re: extending relations more efficiently |