Re: Segmentation fault in PostgreSQL 17.7 during REINDEX TABLE CONCURRENTLY

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Ana Almeida <Ana(dot)Almeida(at)timestamp(dot)pt>
Cc: Tomas Vondra <tomas(at)vondra(dot)me>, Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>, Nuno Azevedo <Nuno(dot)Azevedo(at)timestamp(dot)pt>
Subject: Re: Segmentation fault in PostgreSQL 17.7 during REINDEX TABLE CONCURRENTLY
Date: 2026-03-26 23:44:40
Message-ID: acXE6BTCyk637Sol@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Mar 20, 2026 at 12:26:36PM +0000, Ana Almeida wrote:
> We executed DELETE, VACUUM, and REINDEX commands multiple
> times. During one of the executions, the REINDEX operation failed
> with the error: "could not open file". After this, we dropped and
> recreated the database and repeated the tests. In one of the
> executions, the same REINDEX command resulted in segmentation fault,
> which caused the database to crash. When the REINDEX command failed,
> it left behind temporary index copies with the _ccnew suffix. We
> manually dropped these indexes and re-ran the REINDEX command, which
> then completed successfully.

I am afraid that it is one of these cases where having a
self-contained workload to be able to reproduce the issue, even if the
issue can be hit at a very low rate, would be super useful before we
could categorize that as a backend core issue. I could buy that there
is an in-core problem, but it's hard to justify the time investment
based on an assumption that we may have a problem.

FWIW, I have not seen such problematic error patterns lately, so it's
hard to say. I'll double-check around me and see if there is some data
to fish. Perhaps there is something matching with a portion of your
problematic patterns, or that has a similar smell.
--
Michael

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2026-03-27 01:02:51 Re: BUG #19438: segfault with temp_file_limit inside cursor
Previous Message David G. Johnston 2026-03-26 21:07:39 Re: POSTGIS | SQL Error [42501]: ERROR: permission denied to create "pg_catalog.geometry_dump"