Re: patch: reduce overhead of execution of CALL statement in no atomic mode from PL/pgSQL

Pavel Stehule <pavel.stehule@gmail.com>

From: Pavel Stehule <pavel.stehule@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Date: 2021-01-21T13:37:39Z
Lists: pgsql-hackers

Attachments

Hi

This is a little bit of an enhanced version of the previous patch. The
worst case overhead is reduced almost to zero. The local resource owner is
created only when routine is executed in non-atomic mode, and when routine
contains a CALL statement.

Regards

Pavel

Commits

  1. Rethink recently-added SPI interfaces.

  2. Improve performance of repeated CALLs within plpgsql procedures.

  3. Add the ability for the core grammar to have more than one parse target.