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

2021-09-27 Thread l...@laurent-hasson.com
From: tushar Sent: Monday, September 27, 2021 11:50 To: Andrew Dunstan ; l...@laurent-hasson.com; Julien Rouhaud Cc: Tom Lane ; Ranier Vilela ; Justin Pryzby ; pgsql-performa...@postgresql.org Subject: Re: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4 On 9/27/21 6:55 PM

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

2021-09-27 Thread l...@laurent-hasson.com
From: tushar Sent: Monday, September 27, 2021 11:50 To: Andrew Dunstan ; l...@laurent-hasson.com; Julien Rouhaud Cc: Tom Lane ; Ranier Vilela ; Justin Pryzby ; pgsql-performa...@postgresql.org Subject: Re: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4 On 9/27/21 6:55 PM

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

2021-09-27 Thread tushar
On 9/27/21 6:55 PM, Andrew Dunstan wrote: Hello Andrew, I just download the 13.4 Windows x86-64 installer fromhttps://www.enterprisedb.com/downloads/postgres-postgresql-downloads but it's the exact same file bit for bit from the previous version I had. Am I looking at the wrong place? Than

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

2021-09-27 Thread Andrew Dunstan
On 9/25/21 9:33 PM, l...@laurent-hasson.com wrote: >> > EDB has now published new installers for versions later than release >> > 11, containing Postgres built with an earlier version of gettext that >> > does not exhibit the problem. Please verify that these fix the issue. >>

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

2021-09-25 Thread l...@laurent-hasson.com
> > EDB has now published new installers for versions later than release > > 11, containing Postgres built with an earlier version of gettext that > > does not exhibit the problem. Please verify that these fix the issue. > > If you already have Postgres installed from our installer

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

2021-09-24 Thread l...@laurent-hasson.com
ember 13, 2021 11:36 > >>> To: l...@laurent-hasson.com; Julien Rouhaud > >>> Cc: Tom Lane ; Ranier Vilela > ; > >> > Justin Pryzby ; pgsql- > >>> performa...@postgresql.org > >>> Subject: Re: Big Performance drop o

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

2021-09-24 Thread Andrew Dunstan
Rouhaud >>> Cc: Tom Lane ; Ranier Vilela ; >>> Justin Pryzby ; pgsql- >>> performa...@postgresql.org >>> Subject: 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

2021-09-13 Thread Andrew Dunstan
a ; >> Justin Pryzby ; pgsql- >> performa...@postgresql.org >> Subject: Re: Big Performance drop of Exceptions in UDFs between V11.2 >> and 13.4 >> >> >> On 9/13/21 10:32 AM, l...@laurent-hasson.com wrote: >> > >

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

2021-09-13 Thread l...@laurent-hasson.com
Re: Big Performance drop of Exceptions in UDFs between V11.2 > and 13.4 > > > On 9/13/21 10:32 AM, l...@laurent-hasson.com wrote: > > > > Hello all, > > > > Any further update or guidance on this issue at this time? > >

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

2021-09-13 Thread Andrew Dunstan
On 9/13/21 10:32 AM, l...@laurent-hasson.com wrote: > > Hello all, > > Any further update or guidance on this issue at this time? > Wait for a new installer. Our team is working on it. As I have previously advised you, please be patient. cheers andrew -- Andrew Dunstan EDB: https://www.ente

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

2021-09-13 Thread l...@laurent-hasson.com
Re: Big Performance drop of Exceptions in UDFs between V11.2 > and 13.4 > > > On 9/2/21 11:34 AM, Julien Rouhaud wrote: > > On Thu, Sep 2, 2021 at 11:22 PM Andrew Dunstan > wrote: > >> Here are a couple of pictures of profiles made with

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

2021-09-02 Thread Andrew Dunstan
On 9/2/21 11:34 AM, Julien Rouhaud wrote: > On Thu, Sep 2, 2021 at 11:22 PM Andrew Dunstan wrote: >> Here are a couple of pictures of profiles made with a tool called >> sleepy. The bad profile is from release 13.4 built with the latest >> gettext, built with vcpkg. The good profile is the same

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

2021-09-02 Thread Ranier Vilela
Em qui., 2 de set. de 2021 às 12:22, Andrew Dunstan escreveu: > > On 8/31/21 1:55 PM, Andrew Dunstan wrote: > > On 8/31/21 11:37 AM, Julien Rouhaud wrote: > >> On Tue, Aug 31, 2021 at 10:51 PM l...@laurent-hasson.com > >> wrote: > >>> OK... I thought that track had been abandoned as per Julien's

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

2021-09-02 Thread Julien Rouhaud
On Thu, Sep 2, 2021 at 11:22 PM Andrew Dunstan wrote: > > Here are a couple of pictures of profiles made with a tool called > sleepy. The bad profile is from release 13.4 built with the latest > gettext, built with vcpkg. The good profile is the same build but using > the intl-8.dll copied from th

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

2021-08-31 Thread Julien Rouhaud
On Wed, Sep 1, 2021 at 1:56 AM Andrew Dunstan wrote: > > The culprit turns out to be the precise version of libiconv/libintl > used. There is a slight difference between the versions used in the > 11.13 installer and the 13.4 installer. We need to dig into performance > more (e.g. why does the tes

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

2021-08-31 Thread Andrew Dunstan
On 8/31/21 11:37 AM, Julien Rouhaud wrote: > On Tue, Aug 31, 2021 at 10:51 PM l...@laurent-hasson.com > wrote: >> OK... I thought that track had been abandoned as per Julien's last message. >> Anyways, I'll be patient! >> > I just happened to have both standard installer and locally compiled >

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

2021-08-31 Thread Julien Rouhaud
On Tue, Aug 31, 2021 at 10:51 PM l...@laurent-hasson.com wrote: > > OK... I thought that track had been abandoned as per Julien's last message. > Anyways, I'll be patient! > I just happened to have both standard installer and locally compiled versions available, so I could confirm that I reprodu

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

2021-08-31 Thread l...@laurent-hasson.com
Big Performance drop of Exceptions in UDFs between V11.2 > and 13.4 > > > On 8/30/21 10:18 PM, l...@laurent-hasson.com wrote: > >> I see on https://www.postgresql.org/download/ that there is a > different > >> installer from 2

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

2021-08-31 Thread Andrew Dunstan
On 8/30/21 10:18 PM, l...@laurent-hasson.com wrote: >> I see on https://www.postgresql.org/download/ that there is a different >> installer from 2ndQuadrant. I am going to try that one and see what I >> come up with. Are there any other "standard" distros of Postgres that I >>

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

2021-08-30 Thread Michel SALAIS
-Message d'origine- De : l...@laurent-hasson.com Envoyé : mardi 31 août 2021 04:18 À : l...@laurent-hasson.com; Julien Rouhaud Cc : Tom Lane ; Ranier Vilela ; Andrew Dunstan ; Justin Pryzby ; pgsql-performa...@postgresql.org Objet : RE: Big Performance drop of Exceptions in

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

2021-08-30 Thread l...@laurent-hasson.com
> I see on https://www.postgresql.org/download/ that there is a different > installer from 2ndQuadrant. I am going to try that one and see what I > come up with. Are there any other "standard" distros of Postgres that I > could try out? > > I found out I could download Vis

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

2021-08-30 Thread l...@laurent-hasson.com
> I tried this scenario using edb's 13.3 x64 install: > > postgres=# select version(); >version > > PostgreSQL 13.3, compiled by Visual C++ build 1914, 64-bit > (1 row) > >

RE: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4 (workarounds)

2021-08-29 Thread l...@laurent-hasson.com
Big Performance drop of Exceptions in UDFs between V11.2 > and 13.4 (workarounds) > > On Mon, Aug 30, 2021 at 04:43:23AM +0200, Pavel Stehule wrote: > > po 30. 8. 2021 v 2:44 odesílatel l...@laurent-hasson.com napsal: > > > At this point, I a

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

2021-08-29 Thread Justin Pryzby
On Mon, Aug 30, 2021 at 04:43:23AM +0200, Pavel Stehule wrote: > po 30. 8. 2021 v 2:44 odesílatel l...@laurent-hasson.com napsal: > > At this point, I am not sure how to proceed except to rethink that > > toFloat() function and many other places where we use exceptions. We get > > such dirty data t

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

2021-08-29 Thread Pavel Stehule
Hi po 30. 8. 2021 v 2:44 odesílatel l...@laurent-hasson.com < l...@laurent-hasson.com> napsal: > > > > At this point, I am not sure how to proceed except to rethink that > toFloat() function and many other places where we use exceptions. We get > such dirty data that I need a "safe" way to conver

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

2021-08-29 Thread Julien Rouhaud
On Mon, Aug 30, 2021 at 8:44 AM l...@laurent-hasson.com wrote: > > Yeah, grasping at straws... and no material changes 😊 This is mystifying. > > show lc_messages; > -- English_United States.1252 > > create table sampletest (a varchar, b varchar); > insert into sampletest (a, b) > select substr(md5

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

2021-08-29 Thread Ranier Vilela
esql.org > Subject: Re: Big Performance drop of Exceptions in UDFs between V11.2 and > 13.4 > > Em dom., 29 de ago. de 2021 às 13:03, mailto:l...@laurent-hasson.com > <mailto:l...@laurent-hasson.com> escreveu: > >Sure, there's no question that message trans

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

2021-08-29 Thread l...@laurent-hasson.com
> -Original Message- > From: Tom Lane > Sent: Sunday, August 29, 2021 12:19 > To: l...@laurent-hasson.com > Cc: Ranier Vilela ; Andrew Dunstan > ; Justin Pryzby ; pgsql- > performa...@postgresql.org > Subject: Re: Big Performan

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

2021-08-29 Thread l...@laurent-hasson.com
From: Ranier Vilela Sent: Sunday, August 29, 2021 14:20 To: l...@laurent-hasson.com Cc: Tom Lane ; Andrew Dunstan ; Justin Pryzby ; pgsql-performa...@postgresql.org Subject: Re: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4 Em dom., 29 de ago. de 2021 às 13:03, mailto:l

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

2021-08-29 Thread Ranier Vilela
Em dom., 29 de ago. de 2021 às 13:03, l...@laurent-hasson.com < l...@laurent-hasson.com> escreveu: > >Sure, there's no question that message translation will have *some* cost. > >But on my machine it is an incremental tens-of-percent kind of cost, > >and that is the result you're getting as well.

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

2021-08-29 Thread Tom Lane
"l...@laurent-hasson.com" writes: > Is it possible that the client I am using or the way I am creating the test > database might affect this scenario? I use DBeaver and use the default > settings to create the database: > - default encoding: UTF8 > - collate: English_United States.1252 > - ctype

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

2021-08-29 Thread l...@laurent-hasson.com
>Sure, there's no question that message translation will have *some* cost. >But on my machine it is an incremental tens-of-percent kind of cost, >and that is the result you're getting as well.  So it's not very clear >where these factor-of-several-hundred differences are coming from. >A hypothesis

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

2021-08-29 Thread Ranier Vilela
Em dom., 29 de ago. de 2021 às 10:35, Tom Lane escreveu: > Ranier Vilela writes: > > I retested this case with HEAD, and it seems to me that NLS does affect > it. > > Sure, there's no question that message translation will have *some* cost. > But on my machine it is an incremental tens-of-percen

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

2021-08-29 Thread Tom Lane
Ranier Vilela writes: > I retested this case with HEAD, and it seems to me that NLS does affect it. Sure, there's no question that message translation will have *some* cost. But on my machine it is an incremental tens-of-percent kind of cost, and that is the result you're getting as well. So it'

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

2021-08-29 Thread Ranier Vilela
> Cc: Andrew Dunstan ; Justin Pryzby >> ; Ranier Vilela ; pgsql- >> performa...@postgresql.org > > Subject: Re: Big Performance drop of Exceptions in UDFs between V11.2 >> and 13.4 >> >> "l...@laurent-hasson.com" writes: >

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

2021-08-28 Thread l...@laurent-hasson.com
> -Original Message- > From: Tom Lane > Sent: Saturday, August 28, 2021 15:51 > To: l...@laurent-hasson.com > Cc: Andrew Dunstan ; Justin Pryzby > ; Ranier Vilela ; pgsql- > performa...@postgresql.org > Subject: Re: Big Performan

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

2021-08-28 Thread Tom Lane
"l...@laurent-hasson.com" writes: > SET lc_messages = 'C'; > show lc_messages; --> OK 'C' > explain (analyze,buffers,COSTS,TIMING) > select MAX(toFloat(b, null)) as "b" from sampletest > ... > Execution Time: 175.600 ms > explain (analyze,buffers,COSTS,TIMING) > select MAX(toFloat(a, null)) as

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

2021-08-28 Thread l...@laurent-hasson.com
> -Original Message- > From: Tom Lane > Sent: Friday, August 27, 2021 13:43 > To: l...@laurent-hasson.com > Cc: Justin Pryzby ; Ranier Vilela > ; pgsql-performa...@postgresql.org > Subject: Re: Big Performance drop of Exceptions

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

2021-08-28 Thread l...@laurent-hasson.com
> -Original Message- > From: Tom Lane > Sent: Friday, August 27, 2021 13:43 > To: l...@laurent-hasson.com > Cc: Justin Pryzby ; Ranier Vilela > ; pgsql-performa...@postgresql.org > Subject: Re: Big Performance drop of Exceptions

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

2021-08-27 Thread Tom Lane
"l...@laurent-hasson.com" writes: > That being said, do you have any suggestion how I could circumvent the > issue altogether? Based on Andrew's report, it seems like you might be able to work around it for the time being by disabling message translations, i.e. SET lc_messages = 'C'; Even

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

2021-08-26 Thread l...@laurent-hasson.com
> -Original Message- > From: Andrew Dunstan > Sent: Thursday, August 26, 2021 12:39 > To: l...@laurent-hasson.com; Justin Pryzby ; > Ranier Vilela > Cc: Tom Lane ; pgsql-performa...@postgresql.org > Subject: Re: Big Performance drop

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

2021-08-26 Thread Andrew Dunstan
On 8/26/21 10:47 AM, l...@laurent-hasson.com wrote: > Hello all, > > Any update on this issue? Please don't top-post. We are working on the issue. Please be patient. cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com

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

2021-08-26 Thread l...@laurent-hasson.com
> > Cc: l...@laurent-hasson.com; Tom Lane ; pgsql- > > performa...@postgresql.org > > Subject: Re: Big Performance drop of Exceptions in UDFs between > V11.2 > > and 13.4 > > > > On Sun, Aug 22, 2021 at 08:44

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

2021-08-22 Thread l...@laurent-hasson.com
> -Original Message- > From: Justin Pryzby > Sent: Sunday, August 22, 2021 20:43 > To: Ranier Vilela > Cc: l...@laurent-hasson.com; Tom Lane ; pgsql- > performa...@postgresql.org > Subject: Re: Big Performance drop of Exceptions

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

2021-08-22 Thread Justin Pryzby
On Sun, Aug 22, 2021 at 08:44:34PM -0300, Ranier Vilela wrote: > > 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 have a windows developer > > reproducing the issue between 11 and 12, then that should help. If someone > > ma

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

2021-08-22 Thread Ranier Vilela
> Cc: Justin Pryzby ; Ranier Vilela >> ; pgsql-performa...@postgresql.org > > Subject: Re: Big Performance drop of Exceptions in UDFs between V11.2 >> and 13.4 >> >> "l...@laurent-hasson.com" writes: >> > I do have a Linux in

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

2021-08-22 Thread Ranier Vilela
Em dom., 22 de ago. de 2021 às 14:50, Tom Lane escreveu: > Justin Pryzby writes: > > This looks useful, thanks. It seems like maybe win64 builds are very > slow > > running this: > > > exec_stmt_block() / > > BeginInternalSubTransaction() / > > AbortSubTransaction() / > > reschedule_timeouts()

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

2021-08-22 Thread Andrew Dunstan
gt; ; pgsql-performa...@postgresql.org > > Subject: Re: Big Performance drop of Exceptions in UDFs between V11.2 >> and 13.4 >> >> >> On 8/22/21 4:11 PM, Tom Lane wrote: >> > "l...@laurent-hasson.com" writes:

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

2021-08-22 Thread l...@laurent-hasson.com
> -Original Message- > From: Andrew Dunstan > Sent: Sunday, August 22, 2021 17:27 > To: Tom Lane ; l...@laurent-hasson.com > Cc: Justin Pryzby ; Ranier Vilela > ; pgsql-performa...@postgresql.org > Subject: Re: Big Performance drop

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

2021-08-22 Thread Andrew Dunstan
On 8/22/21 4:11 PM, Tom Lane wrote: > "l...@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 h

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

2021-08-22 Thread l...@laurent-hasson.com
> -Original Message- > From: Tom Lane > Sent: Sunday, August 22, 2021 16:11 > To: l...@laurent-hasson.com > Cc: Justin Pryzby ; Ranier Vilela > ; pgsql-performa...@postgresql.org > Subject: Re: Big Performance drop of Exceptions

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

2021-08-22 Thread Tom Lane
"l...@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 w

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

2021-08-22 Thread l...@laurent-hasson.com
> > ; pgsql-performa...@postgresql.org > > Subject: Re: Big Performance drop of Exceptions in UDFs between > V11.2 > > and 13.4 > > > > "l...@laurent-hasson.com" writes: > > > So, now, in summary: &

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

2021-08-22 Thread l...@laurent-hasson.com
> -Original Message- > From: Tom Lane > Sent: Sunday, August 22, 2021 15:24 > To: l...@laurent-hasson.com > Cc: Justin Pryzby ; Ranier Vilela > ; pgsql-performa...@postgresql.org > Subject: Re: Big Performance drop of Exceptions

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

2021-08-22 Thread Tom Lane
"l...@laurent-hasson.com" writes: > So, now, in summary: > - I have tried V13.4, V12.3, 11.13, 11.2, 11.1 on several Windows VMs and my > personal laptop (no VM). > - All V11.x seem to behave uniformly. > - Starting with 12.3, I am experiencing the major slowdown in the "with > exceptions" scen

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

2021-08-22 Thread l...@laurent-hasson.com
.@laurent-hasson.com; > > pgsql-performa...@postgresql.org > > Subject: Re: Big Performance drop of Exceptions in UDFs between > V11.2 > > and 13.4 > > > > Justin Pryzby writes: > > >

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

2021-08-22 Thread l...@laurent-hasson.com
> -Original Message- > From: Tom Lane > Sent: Sunday, August 22, 2021 13:51 > To: Justin Pryzby > Cc: Ranier Vilela ; l...@laurent-hasson.com; > pgsql-performa...@postgresql.org > Subject: Re: Big Performance drop of Exceptions

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

2021-08-22 Thread l...@laurent-hasson.com
> -Original Message- > From: Justin Pryzby > Sent: Sunday, August 22, 2021 11:48 > To: Ranier Vilela > Cc: l...@laurent-hasson.com; Tom Lane ; pgsql- > performa...@postgresql.org > Subject: Re: Big Performance drop of Exceptions

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

2021-08-22 Thread Tom Lane
Justin Pryzby writes: > This looks useful, thanks. It seems like maybe win64 builds are very slow > running this: > exec_stmt_block() / > BeginInternalSubTransaction() / > AbortSubTransaction() / > reschedule_timeouts() / > schedule_alarm() / > setitimer() / > pg_timer_thread() / > WaitForSingl

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

2021-08-22 Thread Justin Pryzby
On Sun, Aug 22, 2021 at 10:50:47AM -0300, Ranier Vilela wrote: > > Tried to check this with Very Sleepy at Windows 10 (bare metal). > > Not sure it can help if someone can guide how to test this better? > explain (analyze,buffers,COSTS,TIMING) select MAX(toFloat(a, null)) as "a" > from sampletest

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

2021-08-21 Thread l...@laurent-hasson.com
> -Original Message- > From: l...@laurent-hasson.com > Sent: Saturday, August 21, 2021 19:02 > To: Justin Pryzby > Cc: Tom Lane ; pgsql-performa...@postgresql.org > Subject: RE: Big Performance drop of Exceptions in UDFs between V1

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

2021-08-21 Thread l...@laurent-hasson.com
> -Original Message- > From: Justin Pryzby > Sent: Saturday, August 21, 2021 18:17 > To: l...@laurent-hasson.com > Cc: Tom Lane ; pgsql-performa...@postgresql.org > Subject: Re: Big Performance drop of Exceptions in UDFs between V1

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

2021-08-21 Thread Justin Pryzby
Could you send SELECT * FROM pg_config() and try to find the CPU model ? I think it's possible the hypervisor is trapping and emulating unhandled CPU instructions. Actually, it would be interesting to see if the performance differs between 11.2 and 11.13. It's possible that EDB compiled 11.13 on

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

2021-08-21 Thread l...@laurent-hasson.com
> -Original Message- > From: Justin Pryzby > Sent: Saturday, August 21, 2021 15:20 > To: Tom Lane > Cc: l...@laurent-hasson.com; pgsql-performa...@postgresql.org > Subject: Re: Big Performance drop of Exceptions in UDFs between V1

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

2021-08-21 Thread l...@laurent-hasson.com
> -Original Message- > From: Tom Lane > Sent: Saturday, August 21, 2021 14:05 > To: Mladen Gogala > Cc: pgsql-performance@lists.postgresql.org > Subject: Re: Big Performance drop of Exceptions in UDFs between V11.2 > and 13.4 &g

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

2021-08-21 Thread Justin Pryzby
On Sat, Aug 21, 2021 at 02:19:50PM -0500, Justin Pryzby wrote: > As I recall, you're running postgres under a windows VM - I'm not sure if > that's relevant. I tried under a couple hyperv VMs but could not reproduce the issue (only an ~8x difference "with exceptions"). Which hypervisor are you us

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

2021-08-21 Thread Maciek Sakrejda
I happen to have a stock 13.3 and 11.12 on Ubuntu here so I thought I'd contribute numbers in case it's helpful: v13.3: Time: 4368.413 ms (00:04.368) Time: 837.046 ms v11.12: Time: 5178.595 ms (00:05.179) Time: 1027.857 ms (00:01.028) So I'm also seeing a slight improvement in 13, not a degradat

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

2021-08-21 Thread Justin Pryzby
On Sat, Aug 21, 2021 at 02:17:26PM -0400, Tom Lane wrote: > "l...@laurent-hasson.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 er

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

2021-08-21 Thread Tom Lane
"l...@laurent-hasson.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 be

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

2021-08-21 Thread Tom Lane
Mladen Gogala writes: > I know that 14 is a beta version but the performance is significantly > worse than v13 (I assume it's 13.4). Head revision is better than v14 > but still worse than v13.  Can you expand a bit on the difference? [ shrug... ] I don't see any meaningful differences between

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

2021-08-21 Thread l...@laurent-hasson.com
-Original Message- From: Tom Lane Sent: Saturday, August 21, 2021 11:05 To: l...@laurent-hasson.com Cc: pgsql-performa...@postgresql.org Subject: Re: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4 "l...@laurent-hasson.com" writes: > OK... I apologize

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

2021-08-21 Thread Mladen Gogala
I know that 14 is a beta version but the performance is significantly worse than v13 (I assume it's 13.4). Head revision is better than v14 but still worse than v13.  Can you expand a bit on the difference? Where does the difference come from? Are there any differences in the execution plan?  I

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

2021-08-21 Thread Tom Lane
"l...@laurent-hasson.com" writes: > OK... I apologize for the long email before. Right after I sent it, I thought > of a much simpler use-case to illustrate the issue which doesn't depend on > any special data I have access o and complex pivoting. It's as raw as I can > make it. > I create a ta

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

2021-08-21 Thread l...@laurent-hasson.com
t? * Between 11.2 and 13.4, the no-exceptions scenario "b" performs 30x slower (26.6s vs 774.1s). Thank you! Laurent Hasson. From: l...@laurent-hasson.com Sent: Saturday, August 21, 2021 03:57 To: pgsql-performa...@postgresql.org Subject: Big Performance drop of Exceptions in

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

2021-08-21 Thread l...@laurent-hasson.com
Hello all, I think I have identified a major performance issue between V11.2 and 13.4 with respect to exception handling in UDFs. I have the following simplified query that pivots data and makes use of a UDF to convert data to a specific type, in this case, float: select "iccqa_iccassmt_fk"