Re: Global snapshots - Mailing list pgsql-hackers

From Stas Kelvich
Subject Re: Global snapshots
Date
Msg-id B3B6D908-206E-4D54-AA25-B272B1DD64B6@postgrespro.ru
Whole thread Raw
In response to Re: Global snapshots  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Global snapshots  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers

> On 7 May 2018, at 20:04, Robert Haas <robertmhaas@gmail.com> wrote:
> 
> But what happens if a transaction starts on node A at time T0 but
> first touches node B at a much later time T1, such that T1 - T0 >
> global_snapshot_defer_time?
> 

Such transaction will get "global snapshot too old" error.

In principle such behaviour can be avoided by calculating oldest
global csn among all cluster nodes and oldest xmin on particular
node will be held only when there is some open old transaction on
other node. It's easy to do from global snapshot point of view,
but it's not obvious how to integrate that into postgres_fdw. Probably
that will require bi-derectional connection between postgres_fdw nodes
(also distributed deadlock detection will be easy with such connection).

--
Stas Kelvich
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Cutting initdb's runtime (Perl question embedded)
Next
From: Tom Lane
Date:
Subject: Re: perlcritic script