Re: Autonomous transactions 2023, WIP - Mailing list pgsql-hackers

From Andrey M. Borodin
Subject Re: Autonomous transactions 2023, WIP
Date
Msg-id C25D9369-1176-4FD8-8BDD-8D9434CBDBD2@yandex-team.ru
Whole thread Raw
In response to Autonomous transactions 2023, WIP  (Ivan Kush <ivan.kush@tantorlabs.com>)
Responses Re: Autonomous transactions 2023, WIP
List pgsql-hackers

> On 15 Dec 2023, at 16:28, Ivan Kush <ivan.kush@tantorlabs.com> wrote:
>
>
>
> Hello. I'm working on the support of autonomous transactions in Postgres.
>

> # Summary
> * Add pragma AUTONOMOUS_TRANSACTION in the functions. When function
> contains this pragma, the it's executed autonomously
> * Background workers are used to run autonomous sessions.
> * Synchronous execution between backend and autonomous session
> * Postgres Client-Server Protocol is used to communicate between them
> * Pool of autonomous sessions. Pool is created lazily.
> * Infinite nested calls of autonomous functions are allowed. Limited
> only by computer resources.
> * If another 2nd autonomous function is called in the 1st autonomous
> function, the 2nd is executed at the beginning, and then the 1st
> continues execution.

Cool, looks interesting! As far as I know EnterpriseDB, Postgres Pro and OracleDB have this functionality. So, seems
likethe stuff is in demand. 
How does your version compare to this widely used databases? Is anyone else using backgroud connections? Which syntax
isused by other DBMS'? 

Looking into the code it seems like an easy way for PL\pgSQL function to have a client connection. I think this might
workfor other PLs too. 

The patch touches translations ( src/backend/po/). I think we typically do not do this in code patches, because this
workis better handled by translators. 


Best regards, Andrey Borodin.


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Track in pg_replication_slots the reason why slots conflict?
Next
From: Andres Freund
Date:
Subject: Re: [PoC] Improve dead tuple storage for lazy vacuum