Re: BUG #19082: Failing assert in index scan

Peter Geoghegan <pg@bowt.ie>

From: Peter Geoghegan <pg@bowt.ie>
To: postgresql@zr40.nl, pgsql-bugs@lists.postgresql.org
Date: 2025-10-10T15:40:52Z
Lists: pgsql-bugs

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Remove overzealous _bt_killitems assertion.

  2. Make _bt_killitems drop pins it acquired itself.

On Fri, Oct 10, 2025 at 5:51 AM PG Bug reporting form
<noreply@postgresql.org> wrote:
> Last week, I've noticed a crash due to a failed assertion that was
> consistently being triggered by an application every 10 seconds. Here's the
> log:
>
> ---
> TRAP: failed Assert("!XLogRecPtrIsInvalid(so->currPos.lsn)"), File:
> "./build/../src/backend/access/nbtree/nbtutils.c", Line: 1782, PID: 394782
> postgres: mastodon mastodon_production [local]

Does this involve an unlogged table/index?

> Since I noticed that the stack trace mentioned btrees, I reindexed all
> indexes in this database and that appeared to resolve the symptom.

That would be effective in the short term, though only because it'll
reduce the number of dead tuples that can be LP_DEAD set in the index
in the short term.

-- 
Peter Geoghegan