Re: BUG #18815: Logical replication worker Segmentation fault
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Sergey Belyashov <sergey.belyashov@gmail.com>
Cc: Tomas Vondra <tomas@vondra.me>, pgsql-bugs@lists.postgresql.org
Date: 2025-02-17T20:57:30Z
Lists: pgsql-bugs, pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix uninitialized index information access during apply.
- 12eece5fd54c 18.0 landed
-
Assert that ExecOpenIndices and ExecCloseIndices are not repeated.
- e596e077bbb3 18.0 landed
-
Fix crash in brininsertcleanup during logical replication.
- 9ff68679b50f 18.0 landed
- 788baa9a25ae 17.5 landed
Further to this ... I'd still really like to have a reproducer. While brininsertcleanup is clearly being less robust than it should be, I now suspect that there is another bug somewhere further down the call stack. We're getting to this point via ExecCloseIndices, and that should be paired with ExecOpenIndices, and that would have created a fresh IndexInfo. So it looks a lot like some path in a logrep worker is able to call ExecCloseIndices twice on the same working data. That would probably lead to a "releasing a lock you don't own" error if we weren't hitting this crash first. regards, tom lane