Re: Allow "snapshot too old" error, to prevent bloat - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Allow "snapshot too old" error, to prevent bloat
Date
Msg-id 18771.1423965339@sss.pgh.pa.us
Whole thread Raw
In response to Allow "snapshot too old" error, to prevent bloat  (Kevin Grittner <kgrittn@ymail.com>)
Responses Re: Allow "snapshot too old" error, to prevent bloat  (Kevin Grittner <kgrittn@ymail.com>)
List pgsql-hackers
Kevin Grittner <kgrittn@ymail.com> writes:
> What this patch does is add a GUC call old_snapshot_threshold.  It
> defaults to -1, which leaves behavior matching unpatched code.
> Above that it allows tuples to be vacuumed away after the number of
> transaction IDs specified by the GUC have been consumed.

TBH, I'm not sure why we'd wish to emulate Oracle's single worst
operational feature.

> Unlike the other patch, this one is more at the "proof of concept"
> phase, because it requires support in the heap and each index AM to
> work correctly; so far I have only had time to cover the heap and
> btree indexes.

But, having said that, why would the index AMs care?  Seems like what
you are describing should be strictly a matter for VACUUM's removal
rules.  If we're going to have something as ugly as this, I would much
rather it had a very small code footprint.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Kevin Grittner
Date:
Subject: Allow "snapshot too old" error, to prevent bloat
Next
From: Peter Eisentraut
Date:
Subject: Re: improving speed of make check-world