On Mon, Apr 18, 2022 at 10:39 AM Andres Freund <andres@anarazel.de> wrote:
> Right. It's better than what was there before though - I added
> HaveRegisteredOrActiveSnapshot() in the course of
> 7c38ef2a5d6cf6d8dc3834399d7a1c364d64ce64. Where the problem was that we
> didn't have *any* snapshot other than the catalog snapshot, and the
> catalog snapshot only sometimes (iirc for that bug it depended on the
> order in which objects were deleted). That makes such bugs much harder
> to detect.
I still think it would be better to have GetOldestSnapshot() be
smarter and refuse to return the catalog snapshot. For one thing, that
way we'd be testing for the problem case in non-assert builds also.
--
Robert Haas
EDB: http://www.enterprisedb.com