Re: Syncing an application cache with xmin - Mailing list pgsql-general

From Tom Lane
Subject Re: Syncing an application cache with xmin
Date
Msg-id 7819.1359907780@sss.pgh.pa.us
Whole thread Raw
In response to Syncing an application cache with xmin  (Jason Dusek <jason.dusek@gmail.com>)
Responses Re: Syncing an application cache with xmin  (Jason Dusek <jason.dusek@gmail.com>)
List pgsql-general
Jason Dusek <jason.dusek@gmail.com> writes:
> The idea would be, to store information about the last XID in
> the last sync and search for XIDs committed since then upon
> reconnecting for sync. Perhaps `txid_current_snapshot()'
> preserves enough information. Is this a plausible technique?

Perfectly plausible, and often done in one guise or another.  You can't
expect row XIDs to survive forever --- they'll be replaced by FrozenXID
after awhile to avoid problems due to transaction counter wraparound.
But for delays of a few minutes, in a database with an unremarkable
transaction rate, that's not an issue.

            regards, tom lane

pgsql-general by date:

Previous
From: Jason Dusek
Date:
Subject: Syncing an application cache with xmin
Next
From: Jason Dusek
Date:
Subject: Re: Syncing an application cache with xmin