"Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:
> No, that would break MVCC. But we may have done lots of updates/deletes
> that are *not* visible to any Snapshot, yet are not yet removable
> because they are higher than OldestXmin but we don't know that because
> previously the Snapshot details were not available. ISTM that this
> proposal is a way of making the Snapshot limits publicly available so
> that they can be used by VACUUM.
Certainly not, unless you intend that *every* snapshot *must* be
published, which is an overhead up with which we will not put.
One pretty serious problem with the proposal as written is the part
about the sender blocking until the receiver takes the snap; that means
it's not really a "publish" in the sense that you can make it available
without worrying about exactly how many readers there might or might not
be. That alone is sufficient to kill any thought of VACUUM making use
of the info. I'd feel happier with an implementation more like prepared
transactions: you stuff the information into shared memory and it sits
there, readable by anyone, until such time as you take it down again.
Like prepared xacts, GlobalXmin calculations would need to include these
snapshots (and hence they'd limit vacuums).
A shared-memory area would have to be fixed size, but perhaps backing
files, like those used by prepared xacts, could handle the overflow for
very large xip lists. Presumably crash safety is not an issue so this
wouldn't require any complicated mechanism.
regards, tom lane
In response to
pgsql-hackers by date
|Next:||From: Simon Riggs||Date: 2007-01-26 16:37:29|
|Subject: Re: Implied Functional index use (redux)|
|Previous:||From: Alvaro Herrera||Date: 2007-01-26 16:35:34|
|Subject: Re: Piggybacking vacuum I/O|