Re: Syncing an application cache with xmin

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jason Dusek <jason(dot)dusek(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Syncing an application cache with xmin
Date: 2013-02-03 16:09:40
Message-ID: 7819.1359907780@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jason Dusek <jason(dot)dusek(at)gmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jason Dusek 2013-02-03 18:21:10 Re: Syncing an application cache with xmin
Previous Message Jason Dusek 2013-02-03 15:22:44 Syncing an application cache with xmin