Re: TRAP: FailedAssertion("HaveRegisteredOrActiveSnapshot()", File: "toast_internals.c", Line: 670, PID: 19403) - Mailing list pgsql-hackers

From Robert Haas
Subject Re: TRAP: FailedAssertion("HaveRegisteredOrActiveSnapshot()", File: "toast_internals.c", Line: 670, PID: 19403)
Date
Msg-id CA+Tgmoaf4V3JKFE_GsgemiXm7hpQryhanaLHcH=x=-aGWU_nLg@mail.gmail.com
Whole thread Raw
In response to Re: TRAP: FailedAssertion("HaveRegisteredOrActiveSnapshot()", File: "toast_internals.c", Line: 670, PID: 19403)  (Andres Freund <andres@anarazel.de>)
Responses Re: TRAP: FailedAssertion("HaveRegisteredOrActiveSnapshot()", File: "toast_internals.c", Line: 670, PID: 19403)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Replace open mode with PG_BINARY_R/W/A macros
Next
From: Andres Freund
Date:
Subject: Re: Postgres perl module namespace