Re: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: ldh(at)laurent-hasson(dot)com, pgsql-performance(at)postgresql(dot)org
Subject: Re: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4
Date: 2021-08-21 19:19:50
Message-ID: 20210821191950.GW10479@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Sat, Aug 21, 2021 at 02:17:26PM -0400, Tom Lane wrote:
> "ldh(at)laurent-hasson(dot)com" <ldh(at)laurent-hasson(dot)com> writes:
> > So you mean that on average, the 4x overhead of exceptions is around what you'd expect?
>
> Doesn't surprise me any, no. Exception recovery has to clean up after
> a wide variety of possible errors, with only minimal assumptions about
> what the system state had been. So it's expensive. More to the point,
> the overhead's been broadly the same for quite some time.
>
> > As for results in general, yes, your numbers look pretty uniform across versions. On my end, comparing V11.2 vs V13.4 shows a much different picture!
>
> I'm baffled why that should be so. I do not think any of the extensions
> you mention add any exception-recovery overhead, especially not in
> sessions that haven't used them.

Laurent, did you install binaries for v13.4 or compile it ?

What about these ?

SHOW shared_preload_libraries;
SHOW session_preload_libraries;
SHOW local_preload_libraries;

Would you try to reproduce the issue with a fresh database:
CREATE DATABASE udftest; ...

Or a fresh instance created with initdb.

As I recall, you're running postgres under a windows VM - I'm not sure if
that's relevant.

--
Justin

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Maciek Sakrejda 2021-08-21 20:58:21 Re: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4
Previous Message Tom Lane 2021-08-21 18:17:26 Re: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4