Re: Global snapshots - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Global snapshots
Date
Msg-id CA+TgmoZfLj=nMWBOvELzCz-97YX4KrR_P3MZKHvgJstNDG9uNA@mail.gmail.com
Whole thread Raw
In response to Re: Global snapshots  (Stas Kelvich <s.kelvich@postgrespro.ru>)
Responses Re: Global snapshots  (Stas Kelvich <s.kelvich@postgrespro.ru>)
List pgsql-hackers
On Sun, May 6, 2018 at 6:22 AM, Stas Kelvich <s.kelvich@postgrespro.ru> wrote:
> Also each second GetSnapshotData writes globalxmin (as it was before
> procArray->global_snapshot_xmin was taken into account) into a circle
> buffer with a size equal to global_snapshot_defer_time value. That more
> or less the same thing as with Snapshot Too Old feature, but with a
> bucket size of 1 second instead of 1 minute.
> procArray->global_snapshot_xmin is always set to oldest
> value in circle buffer.
>
> This way xmin calculation is always gives a value that were
> global_snapshot_xmin seconds ago and we have mapping from time (or
> GlobalCSN) to globalxmin for each second in this range. So when
> some backends imports global snapshot with some GlobalCSN, that
> GlobalCSN is mapped to a xmin and this xmin is set as a Proc->xmin.

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?

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: make installcheck-world in a clean environment
Next
From: Tom Lane
Date:
Subject: Re: make installcheck-world in a clean environment