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

From Andrew Dunstan
Subject Re: Allow "snapshot too old" error, to prevent bloat
Date
Msg-id 54E64D0F.2030108@dunslane.net
Whole thread Raw
In response to Re: Allow "snapshot too old" error, to prevent bloat  (Kevin Grittner <kgrittn@ymail.com>)
List pgsql-hackers
On 02/19/2015 03:31 PM, Kevin Grittner wrote:

>> What about having the long running snapshots declare their working
>> set, and then only take them into account for global xmin for
>> relations that are in the working set? Like a SET TRANSACTION WORKING
>> SET command. This way the error is deterministic, vacuum on the high
>> churn tables doesn't have to wait for the old transaction delay to
>> expire and we avoid a hard to tune GUC (what do I need to set
>> old_snapshot_threshold to, to reduce bloat while not having "normal"
>> transactions abort).
> Let me make sure I understand your suggestion.  You are suggesting
> that within a transaction you can declare a list of tables which
> should get the "snapshot too old" error (or something like it) if a
> page is read which was modified after the snapshot was taken?
> Snapshots within that transaction would not constrain the effective
> global xmin for purposes of vacuuming those particular tables?


I thought it meant that the declared tables would only be vacuumed 
conservatively, so the transaction would expect not to see "snapshot too 
old" from them.

cheers

andrew






pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Enforce creation of destination folders for source files in pg_regress (Was: pg_regress writes into source tree)
Next
From: Peter Eisentraut
Date:
Subject: Re: CATUPDATE confusion?