On Tue, Jul 19, 2016 at 6:32 PM, Andres Freund <and...@anarazel.de> wrote:
> I mean the only difference between toast / plain heap table WRT > old_snapshot_threshold is that we don't use a mvcc snapshot. We use different functions and never, ever call BufferGetPage -- except for deep in the bowels of the AMs. Countless functions would need to be modified to pass in information about whether any call is one of those which need to test for snapshot-too-old. Since "normal" heap and index access is already covered without that, yet use the AMs, there would be a weird "double coverage" to look out for. On top of all that, you would need to not only throw errors for some cases but (as you pointed out earlier in the thread) turn others into no-ops. Also, some of the toast calls are very far from the calls for the base row, where a function might decide to de-toast some toast pointer. With the naive approach of what you suggest, frequency of checking would go from once per page (containing multiple tuples) to that *plus* once per toast chunk per value per heap tuple, although it seems like checking any one (like the first) toast chunk for a value would suffice. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers