Segmentation fault in PostgreSQL 17.7 during REINDEX TABLE CONCURRENTLY - Mailing list pgsql-bugs

From Ana Almeida
Subject Segmentation fault in PostgreSQL 17.7 during REINDEX TABLE CONCURRENTLY
Date
Msg-id VI0PR07MB10718A4DC292E068C51404AB2974EA@VI0PR07MB10718.eurprd07.prod.outlook.com
Whole thread
Responses Re: Segmentation fault in PostgreSQL 17.7 during REINDEX TABLE CONCURRENTLY
List pgsql-bugs

Hello,

 

While running a REINDEX TABLE CONCURRENTLY on a table indexes in a PostgreSQL 17.7 database, we got the following error:

2026-03-17 18:19:55.244 WAT [2261667] LOG:  server process (PID 2382873) was terminated by signal 11: Segmentation fault

2026-03-17 18:19:55.244 WAT [2261667] DETAIL:  Failed process was running: REINDEX TABLE CONCURRENTLY sibs.purchases;

2026-03-17 18:19:55.244 WAT [2261667] LOG:  terminating any other active server processes

2026-03-17 18:19:55.257 WAT [2261667] LOG:  all server processes terminated; reinitializing

2026-03-17 18:19:55.354 WAT [2382972] LOG:  database system was interrupted; last known up at 2026-03-17 18:18:58 WAT

2026-03-17 18:19:55.449 WAT [2382972] LOG:  database system was not properly shut down; automatic recovery in progress

2026-03-17 18:19:55.457 WAT [2382972] LOG:  redo starts at 310/8142BEC0

2026-03-17 18:19:56.352 WAT [2382972] LOG:  invalid record length at 310/988BAA18: expected at least 24, got 0

2026-03-17 18:19:56.352 WAT [2382972] LOG:  redo done at 310/988BA9E0 system usage: CPU: user: 0.28 s, system: 0.34 s, elapsed: 0.89 s

2026-03-17 18:19:56.360 WAT [2382973] LOG:  checkpoint starting: end-of-recovery immediate wait

 

This is the coredump associated with error.

           PID: 2382873 (postgres)

           UID: 26 (postgres)

           GID: 26 (postgres)

        Signal: 11 (SEGV)

     Timestamp: Tue 2026-03-17 18:19:53 WAT (16h ago)

  Command Line: postgres: postgres easysms_restore_250226 [local] REINDEX

    Executable: /usr/pgsql-17/bin/postgres

Control Group: /system.slice/postgresql-17.service

          Unit: postgresql-17.service

         Slice: system.slice

       Boot ID: 0a323ad20fcf403791a46425b08245f6

    Machine ID: 9db3f77eadaf498bab9ee45abb0ba721

      Hostname: cerstidbtstc

       Storage: /var/lib/systemd/coredump/core.postgres.26.0a323ad20fcf403791a46425b08245f6.2382873.1773767993000000.lz4

       Message: Process 2382873 (postgres) of user 26 dumped core.

 

                Stack trace of thread 2382873:

                #0  0x00000000005d67a8 validate_index_callback (postgres)

                #1  0x00000000005738bd btvacuumpage (postgres)

                #2  0x0000000000573d8a btvacuumscan (postgres)

                #3  0x0000000000573f00 btbulkdelete (postgres)

                #4  0x00000000005d9873 validate_index (postgres)

                #5  0x000000000066b583 ReindexRelationConcurrently.isra.1 (postgres)

                #6  0x000000000066c784 ExecReindex (postgres)

                #7  0x0000000000870d2f ProcessUtilitySlow.isra.5 (postgres)

                #8  0x000000000086fa60 standard_ProcessUtility (postgres)

                #9  0x000000000086e4cf PortalRunUtility (postgres)

                #10 0x000000000086e603 PortalRunMulti (postgres)

                #11 0x000000000086eb5b PortalRun (postgres)

                #12 0x000000000086adab exec_simple_query (postgres)

                #13 0x000000000086c598 PostgresMain (postgres)

                #14 0x00000000008672b5 BackendMain (postgres)

                #15 0x00000000007d850f postmaster_child_launch (postgres)

                #16 0x00000000007dbe5c ServerLoop (postgres)

                #17 0x00000000007dda78 PostmasterMain (postgres)

                #18 0x000000000050f843 main (postgres)

                #19 0x00007f91323277c3 __libc_start_main (libc.so.6)

                #20 0x000000000050fe1e _start (postgres)

 

We were able to run the REINDEX TABLE CONCURRENTLY successfully multiple times, so it doesn’t happen in every execution of the REINDEX.

 

Cumprimentos,

 

Ana Almeida

Consultant

AMS – Advanced Managed Services

_____________________________________________________________________________________________________________________________________________

 

Head Office                      Praça de Alvalade 6, 11 F, 1700-036 Lisboa

Oporto Office                   R. Dominguez Alvarez 44 - Esc 2.04, 4150-801 Porto

E-mail                                ana.almeida@timestamp.pt

Website                            www.timestampgroup.com

Phone                               +351 213 504 870

Mobile                              +351 910 234 477

 

_____________________________________________________________________________________________________________________________________________

 

AVISO LEGAL

Esta mensagem é confidencial e dirigida apenas ao destinatário. Se a recebeu por erro solicitamos que o comunique ao remetente e a elimine assim como qualquer documento anexo. Não há renúncia à confidencialidade nem a nenhum privilégio devido a erro de transmissão.

DISCLAIMER

This message is confidential and intended exclusively for the addressed. If you received this message by mistake please inform the sender and delete the message and attachments. No confidentiality nor any privilege regarding the information is waived or lost by any miscommunication.

 

 

Attachment

pgsql-bugs by date:

Previous
From: Tender Wang
Date:
Subject: Re: BUG #19435: Error: "No relation entry for relid 2" Triggered by Complex Join with Self-Referencing Tables
Next
From: Andrei Lepikhov
Date:
Subject: Re: BUG #19435: Error: "No relation entry for relid 2" Triggered by Complex Join with Self-Referencing Tables