Re: Allow "snapshot too old" error, to prevent bloat

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kevin Grittner <kgrittn(at)ymail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Allow "snapshot too old" error, to prevent bloat
Date: 2015-02-15 01:55:39
Message-ID: 18771.1423965339@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Kevin Grittner <kgrittn(at)ymail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2015-02-15 02:01:48 Re: improving speed of make check-world
Previous Message Kevin Grittner 2015-02-15 01:46:55 Allow "snapshot too old" error, to prevent bloat