Re: cheaper snapshots redux - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: cheaper snapshots redux
Date
Msg-id D8367094-B5B3-4F5F-8713-59EF3BCBA367@nasby.net
Whole thread Raw
In response to Re: cheaper snapshots redux  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: cheaper snapshots redux
List pgsql-hackers
On Aug 25, 2011, at 8:24 AM, Robert Haas wrote:
> My hope (and it might turn out that I'm an optimist) is that even with
> a reasonably small buffer it will be very rare for a backend to
> experience a wraparound condition.  For example, consider a buffer
> with ~6500 entries, approximately 64 * MaxBackends, the approximate
> size of the current subxip arrays taken in aggregate.  I hypothesize
> that a typical snapshot on a running system is going to be very small
> - a handful of XIDs at most - because, on the average, transactions
> are going to commit in *approximately* increasing XID order and, if
> you take the regression tests as representative of a real workload,
> only a small fraction of transactions will have more than one XID.  So

BTW, there's a way to actually gather some data on this by using PgQ (part of Skytools and used by Londiste). PgQ works
bycreating "ticks" at regular intervals, where a tick is basically just a snapshot of committed XIDs. Presumably Slony
doessomething similar. 

I can provide you with sample data from our production systems if you're interested.
--
Jim C. Nasby, Database Architect                   jim@nasby.net
512.569.9461 (cell)                         http://jim.nasby.net




pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Inputting relative datetimes
Next
From: Jim Nasby
Date:
Subject: Re: cheaper snapshots redux