On Thu, Jul 24, 2014 at 3:42 PM, Rohit Goyal <rhtgyl.87@gmail.com> wrote:
> This was really -2 helpful.
I'm not sure what it means to be -2 helpful. Hopefully it's a good thing.
> 1. Can I use this xmin variable directly anytime anywhere in my code as it
> is a global variable.
I don't really know what you're asking. If you want a tutorial on how
global variables work in C, this is the wrong mailing list to ask
about that.
> 2. What is the difference b/w recentXmin and RecentGlobalXmin. I read the
> description but any small detail can clear my mind. :)
RecentXmin is the oldest transaction ID that was still running as of
the last time it was updated. RecentGlobalXmin is the oldest
transaction ID that was part of somebody's snapshot as of the last
time it was updated. Transaction IDs older than RecentXmin can be
assumed not to be running, but there could be still-running
transactions that can't see the effected of some committed transaction
whose ID precedes RecentXmin. Transaction IDs older than
RecentGlobalXmin are no longer running, and furthermore any the
effects of any such transactions which went on to commit are
guaranteed to be visible to the snapshots of all currently-running
transactions, and all future transactions.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company