• Kevin Grittner's avatar
    Add the "snapshot too old" feature · 848ef42b
    Kevin Grittner authored
    This feature is controlled by a new old_snapshot_threshold GUC.  A
    value of -1 disables the feature, and that is the default.  The
    value of 0 is just intended for testing.  Above that it is the
    number of minutes a snapshot can reach before pruning and vacuum
    are allowed to remove dead tuples which the snapshot would
    otherwise protect.  The xmin associated with a transaction ID does
    still protect dead tuples.  A connection which is using an "old"
    snapshot does not get an error unless it accesses a page modified
    recently enough that it might not be able to produce accurate
    results.
    
    This is similar to the Oracle feature, and we use the same SQLSTATE
    and error message for compatibility.
    848ef42b
guc.c 262 KB