On 2014-03-04 16:37:48 -0500, Tom Lane wrote: > However, it seems possible that we could have a mode in which a read-only > session did all its catalog fetches according to the transaction snapshot. > That would get us to a situation where the backend-internal lookups that > ruleutils relies on would give the same answers as queries done by > pg_dump. Robert's work on getting rid of SnapshotNow has probably moved > that much closer than it was before, but it's still not exactly a trivial > patch.
The most interesting bit seems to be the cache invalidation handling. It would need to be something like PushCatalogSnapshot() which disables applying invals, including catchup interrupts and all. If the sinval queue hasn't overflown while that snapshot was up, everything is fine we just need to apply all pending invalidations, if it has, we need to do a InvalidateSystemCaches(). > Meanwhile, Andres claimed upthread that none of the currently-proposed > reduced-lock ALTER commands affect data that pg_dump is using ruleutils > to fetch. If that's the case, then maybe this is a problem that we can > punt till later. I've not gone through the list to verify it though. I think it's true for all but T_AddConstraint, but I am wary about that one anyway. But somebody else should definitely check the list. I wonder if AddConstraintUsing would possibly be safe... Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers