Re: Urgent: Segmentation Fault in PostgreSQL postmaster Process - Mailing list pgsql-admin

From Laurenz Albe
Subject Re: Urgent: Segmentation Fault in PostgreSQL postmaster Process
Date
Msg-id b59a2acb4b6f41a7d4be1f013a97eefcadd7bd36.camel@cybertec.at
Whole thread Raw
In response to Re: Urgent: Segmentation Fault in PostgreSQL postmaster Process  (Veerendra Pulapa <veerendra.pulapa@ashnik.com>)
Responses Re: Urgent: Segmentation Fault in PostgreSQL postmaster Process
List pgsql-admin
On Wed, 2024-06-19 at 12:57 +0530, Veerendra Pulapa wrote:
> Dear,
>
> I have run coredump in my current system but I want to understand the coredump
> file and what went wrong with the signal 11 error(segmentation fault)?
>
> below are the coredump output:
>
> Program terminated with signal 11, Segmentation fault.
> #0  0x00000000004ddc75 in _bt_swap_posting (newitem=newitem@entry=0x254bee8, oposting=oposting@entry=0x7fc6c1b3ee20,
postingoff=1)at nbtdedup.c:800 

That is revealing.  Line number 800 has been a comment since version 13.4,
so you must be running 13.3 or lower.

The only commit that happened to the file between 13.3 and 13.4 is fa675af59f,
which added a check to defend against a crash in connection with corrupted indexes.

So I suggest that you update to 13.latest, as you should always do.
See if the crash turns into an error message.

Then you should try to rebuild the index with REINDEX.  See if that gets rid
of the problem.

However, your server log suggests that you hit the crash while in crash recovery.
In that case you won't get far enough to rebuild any indexes.

Your options are probably to restore a backup or to venture "pg_resetwal" to
get the system up.  But "pg_resetwal" will destroy data and further corrupt
your database, so take a backup before you do that.
The goal of "pg_resetwal" is to get the server up so you can try to "pg_dump"
the database and restore it somewhere else.

Yours,
Laurenz Albe



pgsql-admin by date:

Previous
From: Veerendra Pulapa
Date:
Subject: Re: Urgent: Segmentation Fault in PostgreSQL postmaster Process
Next
From: Veerendra Pulapa
Date:
Subject: Re: Urgent: Segmentation Fault in PostgreSQL postmaster Process