Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mHWXF-0001ev-0W for pgsql-performance@arkaria.postgresql.org; Sat, 21 Aug 2021 19:20:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mHWXC-0003Xd-1U for pgsql-performance@arkaria.postgresql.org; Sat, 21 Aug 2021 19:20:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mHWXB-0003XI-MS for pgsql-performance@lists.postgresql.org; Sat, 21 Aug 2021 19:20:01 +0000 Received: from mail-io1-xd2c.google.com ([2607:f8b0:4864:20::d2c]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mHWX4-0005LQ-Ed for pgsql-performance@postgresql.org; Sat, 21 Aug 2021 19:20:00 +0000 Received: by mail-io1-xd2c.google.com with SMTP id b200so16559336iof.13 for ; Sat, 21 Aug 2021 12:19:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=7EpzYMI3xsvpeJ8HKNSj+1QRxXmi6bRcwm6HIM33smQ=; b=oA/vnYLfnE4F7c1KwETRx0OKowWqyhKS6lHHjCa+Ilkkd2bNCQG3AcdAtJXk99PY79 3INFQAfBfO6WsKArrNLgUnFrWD49Mg0k+YIo6VPxMgb5RzyrjvNyqu6FLggRiLhPlg8C 4dgBrXrzwFpaI6mf3EBGEL/BZr66P0BEuPeB8LABkTXEPjEHTlwWMAqVa2ZbgjTn+ii+ Ga0s+W2Zvts+3zkGSMLbZZAejcxEo3FlCwtJsJNilxgWCgfVwdm030QLYRoq+EyyKg5J QzSqjLqFN9X8qy3vaC9SZ+ZXH6A7sqo6sFzhWFuWWG5eulOqPFme2pwrTkyO2fAu4K85 Bg1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=7EpzYMI3xsvpeJ8HKNSj+1QRxXmi6bRcwm6HIM33smQ=; b=VPS+k7Ic6tswpp1sEzyym2PUbTx5//3TjlPqoTqqu9A9A3kdPLyvTZIMq+cgI6nyE1 Yu+YELALVPRSWA6rDoxFvqaeKgxHhjWubtnjg5HOP1Rf/NxUaqcWLOOW9fqFEC1lDmep RZWUgUE5dMJaK3L7bVQ+OAftm7LpqkEk7xapGwryV9P5bJj+YqBS1fFfGKQO3hsI3rJj hwForVzlLE0+IIBYv1Zn2QCrrFwhCAja0U2iaZ9F3LKGuGGN5LGrmhLzLxnjSxwYd97C CxrMN++O5OnTa0l0e62vrZo8QakLEmveDBVoilz7BVLNrZt7qijHrYjBZPu1meIqFmEJ oy9A== X-Gm-Message-State: AOAM530AdkasLm2UKZeINELxcGHtf4B1AWRHivZ9tf1Z3kMydm8jMG8/ ze0PP9UoAR3eIUOWhhuvxleMCQ== X-Google-Smtp-Source: ABdhPJwFK7KQNjPAWHOjfvf6/r/YTd8RjEQVKGq4+Y2tJ8bpoiYqBlmCRJCMzRdLVcoEOCA0HrcR3w== X-Received: by 2002:a02:cbb0:: with SMTP id v16mr23344868jap.114.1629573591831; Sat, 21 Aug 2021 12:19:51 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id m5sm5898901ila.10.2021.08.21.12.19.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Aug 2021 12:19:51 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 5E643800BDB; Sat, 21 Aug 2021 14:19:50 -0500 (CDT) Date: Sat, 21 Aug 2021 14:19:50 -0500 From: Justin Pryzby To: Tom Lane Cc: ldh@laurent-hasson.com, pgsql-performance@postgresql.org Subject: Re: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4 Message-ID: <20210821191950.GW10479@telsasoft.com> References: <2092859.1629558281@sss.pgh.pa.us> <2136207.1629569846@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2136207.1629569846@sss.pgh.pa.us> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, Aug 21, 2021 at 02:17:26PM -0400, Tom Lane wrote: > "ldh@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 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