Re: eXtensible Transaction Manager API - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: eXtensible Transaction Manager API
Date
Msg-id CANP8+jKn+m36b9Oi-VZyQZz-hHSbtHnvvcVFuV4qi0j0=HSmKw@mail.gmail.com
Whole thread Raw
In response to eXtensible Transaction Manager API  (konstantin knizhnik <k.knizhnik@postgrespro.ru>)
Responses Re: eXtensible Transaction Manager API  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
List pgsql-hackers
On 31 October 2015 at 10:22, konstantin knizhnik <k.knizhnik@postgrespro.ru> wrote:
Hi,

PostgresPro cluster team wants to announce proposal for eXtensible Transaction Manager API and reference implementation of distributed transaction manager (pg_dtm).
pg_dtm is just a standard PostgreSQL extension which should be installed in normal way.

Source of pg_dtm and PostgreSQL patches are available here: https://github.com/postgrespro/pg_dtm
WiKi page: https://wiki.postgresql.org/wiki/DTM

Very interesting work.
 
xtm.patch patches PostgreSQL core by replacing direct calls of 7 TM functions with indirect calls and

At first I was concerned about recovery, but that looks to be covered.

PostgreSQL assumes that top-level xid commit is atomic, along with all of its subtransactions. So the API having access to only Get/Set at the xid level would not work. We would need TransactionIdSetTreeStatus() rather than just SetStatus. GetStatus is not atomic.
 
adding 3 addition events to transaction commit callbacks:

Those look uncontentious, so we should add those anyway in a sub-patch.
 
We have also pgDTM implementation which is using timestamps (system time) as CSNs.
It is also based on the same XTM transaction API.
We will publish it later once we clarify problems with recovery and performance with this approach.

That is most interesting part, so it needs to be published.

At present, I can't tell whether you need subtrans and multixact calls in the API as well. I would imagine we probably do, though we might imagine an implementation that didn't support those concepts.

--
Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: onlyvalue aggregate (was: First Aggregate Funtion?)
Next
From: Simon Riggs
Date:
Subject: Re: onlyvalue aggregate (was: First Aggregate Funtion?)