RE: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4 - Mailing list pgsql-performance

From ldh@laurent-hasson.com
Subject RE: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4
Date
Msg-id MN2PR15MB2560F5ABDE7BE85C11625AFD85C39@MN2PR15MB2560.namprd15.prod.outlook.com
Whole thread Raw
In response to Re: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4
Re: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4
List pgsql-performance

   >  -----Original Message-----
   >  From: Tom Lane <tgl@sss.pgh.pa.us>
   >  Sent: Sunday, August 22, 2021 16:11
   >  To: ldh@laurent-hasson.com
   >  Cc: Justin Pryzby <pryzby@telsasoft.com>; Ranier Vilela
   >  <ranier.vf@gmail.com>; pgsql-performance@postgresql.org
   >  Subject: Re: Big Performance drop of Exceptions in UDFs between V11.2
   >  and 13.4
   >
   >  "ldh@laurent-hasson.com" <ldh@laurent-hasson.com> writes:
   >  > I do have a Linux install of 13.3, and things work beautifully, so this is
   >  definitely a Windows thing here that started in V12.
   >
   >  It's good to have a box around it, but that's still a pretty large box :-(.
   >
   >  I'm hoping that one of our Windows-using developers will see if they can
   >  reproduce this, and if so, try to bisect where it started.
   >  Not sure how to make further progress without that.
   >
   >              regards, tom lane

Hello Tom,

If there is any way I can help further... I am definitely not able to do a dev environment and local build, but if we
havea windows developer reproducing the issue between 11 and 12, then that should help. If someone makes a debug build
availableto me, I can provide additional help based on that. 

That being said, do you have any suggestion how I could circumvent the issue altogether? Is there a way I could convert
aString to some type (integer, float, date...) without exceptions and in case of failure, return a default value? Maybe
thereis a way to do this and I can avoid exception handling altogether? Or use something else than plpgsql? I am always
underthe impression that plpgsql is the best performing option? 

I have seen regex-based options out there, but none being fully satisfying for floating points in particular.

Thank you,
Laurent.






pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4
Next
From: Andrew Dunstan
Date:
Subject: Re: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4