Обсуждение: Urgent: Segmentation Fault in PostgreSQL postmaster Process

Поиск
Список
Период
Сортировка

Urgent: Segmentation Fault in PostgreSQL postmaster Process

От
Veerendra Pulapa
Дата:
Dear Team,

I am experiencing a segmentation fault issue with the postmaster process of our PostgreSQL database, and I am seeking your assistance. Below are the details of the error and our system configuration.

Issue Description
We encountered a segmentation fault in the postmaster process of our PostgreSQL instance. The relevant system log entry is as follows:

DB Logs:
LOG:  restartpoint starting: time
LOG:  startup process (PID 21704) was terminated by signal 11: Segmentation fault
LOG:  terminating any other active server processes
LOG:  database system is shut down
LOG:  starting PostgreSQL 13.2 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit
LOG:  listening on IPv4 address "0.0.0.0", port 5432
LOG:  listening on IPv6 address "::", port 5432
LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
LOG:  database system was interrupted while in recovery at log time 2024-06-16 19:37:48 +08
HINT:  If this has occurred more than once some data might be corrupted and you might need to choose an earlier recovery target.

OS logs:
kernel: postmaster[7844]: segfault at 2dd736b ip 00000000004ddc75 sp 00007ffe0e9c3490 error 6 in postgres[400000+73e000]

PostgreSQL Version and Environment:
PostgreSQL Version: 13.2
Operating System: rhel 7.9
Kernel Version: 3.10.0-1160.118.1.el7.x86_64
System Specifications: [32 vCPU, 250GB]

Br,
Veerendra Pulapa | Technical Consultant
M: +91-9949349894 | www.ashnik.com


            


______________________________________________________________________________________
This email may contain confidential, privileged or copyright material and is solely for the use of the intended recipient(s). If you are not the rightful recipient of this email, please delete this email immediately and inform the recipient. 

Check if any disk issues

Storage is local or SAN ,  if SAN see if any hiccups to communicate SAN

Check disk space usage

 

 

 

From: Veerendra Pulapa <veerendra.pulapa@ashnik.com>
Sent: Sunday, June 16, 2024 7:49 PM
To: pgsql-admin <pgsql-admin@postgresql.org>; pgsql-admin@lists.postgresql.org
Subject: Urgent: Segmentation Fault in PostgreSQL postmaster Process

 

Dear Team,

 

I am experiencing a segmentation fault issue with the postmaster process of our PostgreSQL database, and I am seeking your assistance. Below are the details of the error and our system configuration.

 

Issue Description

We encountered a segmentation fault in the postmaster process of our PostgreSQL instance. The relevant system log entry is as follows:

 

DB Logs:

LOG:  restartpoint starting: time

LOG:  startup process (PID 21704) was terminated by signal 11: Segmentation fault

LOG:  terminating any other active server processes

LOG:  database system is shut down

LOG:  starting PostgreSQL 13.2 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit

LOG:  listening on IPv4 address "0.0.0.0", port 5432

LOG:  listening on IPv6 address "::", port 5432

LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"

LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"

LOG:  database system was interrupted while in recovery at log time 2024-06-16 19:37:48 +08

HINT:  If this has occurred more than once some data might be corrupted and you might need to choose an earlier recovery target.

 

OS logs:

kernel: postmaster[7844]: segfault at 2dd736b ip 00000000004ddc75 sp 00007ffe0e9c3490 error 6 in postgres[400000+73e000]

 

PostgreSQL Version and Environment:

PostgreSQL Version: 13.2

Operating System: rhel 7.9

Kernel Version: 3.10.0-1160.118.1.el7.x86_64

System Specifications: [32 vCPU, 250GB]

 

Br,

Veerendra Pulapa | Technical Consultant

M: +91-9949349894 | www.ashnik.com

            

 

______________________________________________________________________________________

This email may contain confidential, privileged or copyright material and is solely for the use of the intended recipient(s). If you are not the rightful recipient of this email, please delete this email immediately and inform the recipient. 

 

Re: Urgent: Segmentation Fault in PostgreSQL postmaster Process

От
Vijaykumar Jain
Дата:


On Mon, Jun 17, 2024, 5:19 AM Veerendra Pulapa <veerendra.pulapa@ashnik.com> wrote:


OS logs:
kernel: postmaster[7844]: segfault at 2dd736b ip 00000000004ddc75 sp 00007ffe0e9c3490 error 6 in postgres[400000+73e000]

PostgreSQL Version and Environment:
PostgreSQL Version: 13.2
Operating System: rhel 7.9
Kernel Version: 3.10.0-1160.118.1.el7.x86_64
System Specifications: [32 vCPU, 250GB]

is it possible for you to do a minor upgrade to latest 13.12 version.
it should be a minor upgrade , upgrade and restart might be all you need.
iirc there were bugs in older 13.x versions that were fixed in later versions.



Re: Urgent: Segmentation Fault in PostgreSQL postmaster Process

От
Achilleas Mantzios
Дата:
Στις 17/6/24 02:49, ο/η Veerendra Pulapa έγραψε:
Dear Team,

I am experiencing a segmentation fault issue with the postmaster process of our PostgreSQL database, and I am seeking your assistance. Below are the details of the error and our system configuration.

Issue Description
We encountered a segmentation fault in the postmaster process of our PostgreSQL instance. The relevant system log entry is as follows:

DB Logs:
LOG:  restartpoint starting: time
LOG:  startup process (PID 21704) was terminated by signal 11: Segmentation fault
LOG:  terminating any other active server processes
LOG:  database system is shut down
LOG:  starting PostgreSQL 13.2 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit
LOG:  listening on IPv4 address "0.0.0.0", port 5432
LOG:  listening on IPv6 address "::", port 5432
LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
LOG:  database system was interrupted while in recovery at log time 2024-06-16 19:37:48 +08
HINT:  If this has occurred more than once some data might be corrupted and you might need to choose an earlier recovery target.

This runs as a primary right? The logs indicate that the postmaster had already crashed and was trying to recover while it threw another segfault.

Give us some historical background of any events that happened in the course of your installation that might be of any interest. Such as, how often do you get the problem, how long are you having this problem, what did change before the problem started to appear (software/hardware).

IME, such errors could be due to either faulty CPU or memory. I'd run a memtest and run diagnostics (BIOS), check temperatures, etc


OS logs:
kernel: postmaster[7844]: segfault at 2dd736b ip 00000000004ddc75 sp 00007ffe0e9c3490 error 6 in postgres[400000+73e000]

PostgreSQL Version and Environment:
PostgreSQL Version: 13.2
Operating System: rhel 7.9
Kernel Version: 3.10.0-1160.118.1.el7.x86_64
System Specifications: [32 vCPU, 250GB]

Br,
Veerendra Pulapa | Technical Consultant
M: +91-9949349894 | www.ashnik.com


            


______________________________________________________________________________________
This email may contain confidential, privileged or copyright material and is solely for the use of the intended recipient(s). If you are not the rightful recipient of this email, please delete this email immediately and inform the recipient. 

-- 
Achilleas Mantzios IT DEV - HEAD IT DEPT Dynacom Tankers Mgmt (as agents only)

Re: Urgent: Segmentation Fault in PostgreSQL postmaster Process

От
Veerendra Pulapa
Дата:
I have checked with the system team as per them there is no issue with the disk and it is SAN. Did not see any issue with communication. 

Br,
Veerendra Pulapa | Technical Consultant
M: +91-9949349894 | www.ashnik.com


            



On Mon, Jun 17, 2024 at 8:32 AM <lennam@incisivetechgroup.com> wrote:

Check if any disk issues

Storage is local or SAN ,  if SAN see if any hiccups to communicate SAN

Check disk space usage

 

 

 

From: Veerendra Pulapa <veerendra.pulapa@ashnik.com>
Sent: Sunday, June 16, 2024 7:49 PM
To: pgsql-admin <pgsql-admin@postgresql.org>; pgsql-admin@lists.postgresql.org
Subject: Urgent: Segmentation Fault in PostgreSQL postmaster Process

 

Dear Team,

 

I am experiencing a segmentation fault issue with the postmaster process of our PostgreSQL database, and I am seeking your assistance. Below are the details of the error and our system configuration.

 

Issue Description

We encountered a segmentation fault in the postmaster process of our PostgreSQL instance. The relevant system log entry is as follows:

 

DB Logs:

LOG:  restartpoint starting: time

LOG:  startup process (PID 21704) was terminated by signal 11: Segmentation fault

LOG:  terminating any other active server processes

LOG:  database system is shut down

LOG:  starting PostgreSQL 13.2 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit

LOG:  listening on IPv4 address "0.0.0.0", port 5432

LOG:  listening on IPv6 address "::", port 5432

LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"

LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"

LOG:  database system was interrupted while in recovery at log time 2024-06-16 19:37:48 +08

HINT:  If this has occurred more than once some data might be corrupted and you might need to choose an earlier recovery target.

 

OS logs:

kernel: postmaster[7844]: segfault at 2dd736b ip 00000000004ddc75 sp 00007ffe0e9c3490 error 6 in postgres[400000+73e000]

 

PostgreSQL Version and Environment:

PostgreSQL Version: 13.2

Operating System: rhel 7.9

Kernel Version: 3.10.0-1160.118.1.el7.x86_64

System Specifications: [32 vCPU, 250GB]

 

Br,

Veerendra Pulapa | Technical Consultant

M: +91-9949349894 | www.ashnik.com

            

 

______________________________________________________________________________________

This email may contain confidential, privileged or copyright material and is solely for the use of the intended recipient(s). If you are not the rightful recipient of this email, please delete this email immediately and inform the recipient. 

 


______________________________________________________________________________________
This email may contain confidential, privileged or copyright material and is solely for the use of the intended recipient(s). If you are not the rightful recipient of this email, please delete this email immediately and inform the recipient. 

Re: Urgent: Segmentation Fault in PostgreSQL postmaster Process

От
Veerendra Pulapa
Дата:
Where will we get PostgreSQL bug reports?

Br,
Veerendra Pulapa | Technical Consultant
M: +91-9949349894 | www.ashnik.com


            



On Mon, Jun 17, 2024 at 10:40 AM Vijaykumar Jain <vijaykumarjain.github@gmail.com> wrote:


On Mon, Jun 17, 2024, 5:19 AM Veerendra Pulapa <veerendra.pulapa@ashnik.com> wrote:


OS logs:
kernel: postmaster[7844]: segfault at 2dd736b ip 00000000004ddc75 sp 00007ffe0e9c3490 error 6 in postgres[400000+73e000]

PostgreSQL Version and Environment:
PostgreSQL Version: 13.2
Operating System: rhel 7.9
Kernel Version: 3.10.0-1160.118.1.el7.x86_64
System Specifications: [32 vCPU, 250GB]

is it possible for you to do a minor upgrade to latest 13.12 version.
it should be a minor upgrade , upgrade and restart might be all you need.
iirc there were bugs in older 13.x versions that were fixed in later versions.




______________________________________________________________________________________
This email may contain confidential, privileged or copyright material and is solely for the use of the intended recipient(s). If you are not the rightful recipient of this email, please delete this email immediately and inform the recipient. 

Re: Urgent: Segmentation Fault in PostgreSQL postmaster Process

От
Veerendra Pulapa
Дата:
The signal 11 error reported only on the standby node. We have two nodes, one master and one standby. And Virtual machines are hosted in azure. 

We have upgraded the OS from 7.x to 8.x after the upgrade we have observed some discrepancy then we rollback the OS. Even after rollback we are also facing the same problem.

Br,
Veerendra Pulapa | Technical Consultant
M: +91-9949349894 | www.ashnik.com


            



On Mon, Jun 17, 2024 at 10:44 AM Achilleas Mantzios <a.mantzios@cloud.gatewaynet.com> wrote:
Στις 17/6/24 02:49, ο/η Veerendra Pulapa έγραψε:
Dear Team,

I am experiencing a segmentation fault issue with the postmaster process of our PostgreSQL database, and I am seeking your assistance. Below are the details of the error and our system configuration.

Issue Description
We encountered a segmentation fault in the postmaster process of our PostgreSQL instance. The relevant system log entry is as follows:

DB Logs:
LOG:  restartpoint starting: time
LOG:  startup process (PID 21704) was terminated by signal 11: Segmentation fault
LOG:  terminating any other active server processes
LOG:  database system is shut down
LOG:  starting PostgreSQL 13.2 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit
LOG:  listening on IPv4 address "0.0.0.0", port 5432
LOG:  listening on IPv6 address "::", port 5432
LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
LOG:  database system was interrupted while in recovery at log time 2024-06-16 19:37:48 +08
HINT:  If this has occurred more than once some data might be corrupted and you might need to choose an earlier recovery target.

This runs as a primary right? The logs indicate that the postmaster had already crashed and was trying to recover while it threw another segfault.

Give us some historical background of any events that happened in the course of your installation that might be of any interest. Such as, how often do you get the problem, how long are you having this problem, what did change before the problem started to appear (software/hardware).

IME, such errors could be due to either faulty CPU or memory. I'd run a memtest and run diagnostics (BIOS), check temperatures, etc


OS logs:
kernel: postmaster[7844]: segfault at 2dd736b ip 00000000004ddc75 sp 00007ffe0e9c3490 error 6 in postgres[400000+73e000]

PostgreSQL Version and Environment:
PostgreSQL Version: 13.2
Operating System: rhel 7.9
Kernel Version: 3.10.0-1160.118.1.el7.x86_64
System Specifications: [32 vCPU, 250GB]

Br,
Veerendra Pulapa | Technical Consultant
M: +91-9949349894 | www.ashnik.com


            


______________________________________________________________________________________
This email may contain confidential, privileged or copyright material and is solely for the use of the intended recipient(s). If you are not the rightful recipient of this email, please delete this email immediately and inform the recipient. 

-- 
Achilleas Mantzios IT DEV - HEAD IT DEPT Dynacom Tankers Mgmt (as agents only)

______________________________________________________________________________________
This email may contain confidential, privileged or copyright material and is solely for the use of the intended recipient(s). If you are not the rightful recipient of this email, please delete this email immediately and inform the recipient. 

Re: Urgent: Segmentation Fault in PostgreSQL postmaster Process

От
Laurenz Albe
Дата:
On Mon, 2024-06-17 at 18:30 +0530, Veerendra Pulapa wrote:
> LOG:  startup process (PID 21704) was terminated by signal 11: Segmentation fault

If you want any support for that, you need to collect a core dump and
generate a stack trace.  Make sure that you have the debugging symbols installed.

Also, we'd need to see the log messages *before* the lines you show.  Everything
since the start of the server.

A segmentation fault is caused by a software bug.  Since it happens during
recovery, perhaps the WAL that is being replayed is corrupted and makes
PostgreSQL fail.

My recommendation is to restore your last good backup.

Yours,
Laurenz Albe



Re: Urgent: Segmentation Fault in PostgreSQL postmaster Process

От
Veerendra Pulapa
Дата:
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:

/usr/bin/gdb /usr/pgsql-13/bin/postgres /mnt/spool/abrt/ccpp-2024-06-18-11\:05\:00-7214/coredump
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-120.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
Reading symbols from /usr/pgsql-13/bin/postgres...Reading symbols from /usr/lib/debug/usr/pgsql-13/bin/postgres.debug...done.
done.

warning: core file may not match specified executable file.
[New LWP 7214]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `postgres: startup recovering 0000000100007C49000000A5'.
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
800     nbtdedup.c: No such file or directory.
Missing separate debuginfos, use: debuginfo-install audit-libs-2.8.5-4.el7.x86_64 bzip2-libs-1.0.6-13.el7.x86_64 cyrus-sasl-lib-2.1.26-24.el7_9.x86_64 elfutils-libelf-0.176-5.el7.x86_64 elfutils-libs-0.176-5.el7.x86_64 glibc-2.17-326.el7_9.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.15.1-55.el7_9.x86_64 libattr-2.4.46-13.el7.x86_64 libcap-2.22-11.el7.x86_64 libcap-ng-0.7.5-4.el7.x86_64 libcom_err-1.42.9-19.el7.x86_64 libgcc-4.8.5-44.el7.x86_64 libgcrypt-1.5.3-14.el7.x86_64 libgpg-error-1.12-3.el7.x86_64 libicu-50.2-4.el7_7.x86_64 libselinux-2.5-15.el7.x86_64 libstdc++-4.8.5-44.el7.x86_64 libxml2-2.9.1-6.el7_9.6.x86_64 lz4-1.8.3-1.el7.x86_64 nspr-4.35.0-1.el7_9.x86_64 nss-3.90.0-2.el7_9.x86_64 nss-softokn-freebl-3.90.0-6.el7_9.x86_64 nss-util-3.90.0-1.el7_9.x86_64 openldap-2.4.44-25.el7_9.x86_64 openssl-libs-1.0.2k-26.el7_9.x86_64 pam-1.1.8-23.el7.x86_64 pcre-8.32-17.el7.x86_64 systemd-libs-219-78.el7_9.9.x86_64 xz-libs-5.2.2-2.el7_9.x86_64 zlib-1.2.7-21.el7_9.x86_64
(gdb) bt
#0  0x00000000004ddc75 in _bt_swap_posting (newitem=newitem@entry=0x254bee8, oposting=oposting@entry=0x7fc6c1b3ee20, postingoff=1) at nbtdedup.c:800
#1  0x00000000004ee423 in btree_xlog_insert (isleaf=isleaf@entry=true, ismeta=ismeta@entry=false, posting=posting@entry=true, record=record@entry=0x2529d48) at nbtxlog.c:224
#2  0x00000000004eeea4 in btree_redo (record=0x2529d48) at nbtxlog.c:969
#3  0x000000000051caa5 in StartupXLOG () at xlog.c:7319
#4  0x00000000007197a1 in StartupProcessMain () at startup.c:204
#5  0x000000000052b94c in AuxiliaryProcessMain (argc=argc@entry=2, argv=argv@entry=0x7ffd95f45740) at bootstrap.c:443
#6  0x000000000071679e in StartChildProcess (type=StartupProcess) at postmaster.c:5492
#7  0x00000000007190e4 in PostmasterMain (argc=argc@entry=3, argv=argv@entry=0x24f9280) at postmaster.c:1404
#8  0x0000000000488bbd in main (argc=3, argv=0x24f9280) at main.c:210
(gdb)

Br,
Veerendra Pulapa | Technical Consultant
M: +91-9949349894 | www.ashnik.com


            



On Mon, Jun 17, 2024 at 8:09 PM Laurenz Albe <laurenz.albe@cybertec.at> wrote:
On Mon, 2024-06-17 at 18:30 +0530, Veerendra Pulapa wrote:
> LOG:  startup process (PID 21704) was terminated by signal 11: Segmentation fault

If you want any support for that, you need to collect a core dump and
generate a stack trace.  Make sure that you have the debugging symbols installed.

Also, we'd need to see the log messages *before* the lines you show.  Everything
since the start of the server.

A segmentation fault is caused by a software bug.  Since it happens during
recovery, perhaps the WAL that is being replayed is corrupted and makes
PostgreSQL fail.

My recommendation is to restore your last good backup.

Yours,
Laurenz Albe

______________________________________________________________________________________
This email may contain confidential, privileged or copyright material and is solely for the use of the intended recipient(s). If you are not the rightful recipient of this email, please delete this email immediately and inform the recipient. 

Re: Urgent: Segmentation Fault in PostgreSQL postmaster Process

От
Laurenz Albe
Дата:
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



Re: Urgent: Segmentation Fault in PostgreSQL postmaster Process

От
Veerendra Pulapa
Дата:
How do we check code 13.3 and 13.4  nbtdedup.c:800?

Regarding this issue can we get any relevant information? Where can we find bug information? 
 
Br,
Veerendra Pulapa | Technical Consultant
M: +91-9949349894 | www.ashnik.com


            



On Wed, Jun 19, 2024 at 1:20 PM Laurenz Albe <laurenz.albe@cybertec.at> wrote:
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

______________________________________________________________________________________
This email may contain confidential, privileged or copyright material and is solely for the use of the intended recipient(s). If you are not the rightful recipient of this email, please delete this email immediately and inform the recipient. 

Re: Urgent: Segmentation Fault in PostgreSQL postmaster Process

От
Laurenz Albe
Дата:
On Wed, 2024-06-19 at 13:32 +0530, Veerendra Pulapa wrote:
> How do we check code 13.3 and 13.4  nbtdedup.c:800?
>
> Regarding this issue can we get any relevant information? Where can we find bug information?

Huh?  PostgreSQL is open source.

I told you it is commit fa675af59f, so you can look at

https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=fa675af59f

It is also listed in the release notes of 13.4:
https://www.postgresql.org/docs/13/release-13-4.html

- Harden B-tree posting list split code against corrupt data (Peter Geoghegan)

  Throw an error, rather than crashing, for an attempt to insert an item with a
  TID identical to an existing entry. While that shouldn't ever happen, it has
  been reported to happen when the index is inconsistent with its table.

Yours,
Laurenz Albe



Re: Urgent: Segmentation Fault in PostgreSQL postmaster Process

От
Michael Banck
Дата:
Hi,

On Wed, Jun 19, 2024 at 10:08:14AM +0200, Laurenz Albe wrote:
> On Wed, 2024-06-19 at 13:32 +0530, Veerendra Pulapa wrote:
> > How do we check code 13.3 and 13.4  nbtdedup.c:800?
> > 
> > Regarding this issue can we get any relevant information? Where can we find bug information?
> 
> Huh?  PostgreSQL is open source.
> 
> I told you it is commit fa675af59f, so you can look at
> 
> https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=fa675af59f
> 
> It is also listed in the release notes of 13.4:
> https://www.postgresql.org/docs/13/release-13-4.html
> 
> - Harden B-tree posting list split code against corrupt data (Peter Geoghegan)
> 
>   Throw an error, rather than crashing, for an attempt to insert an item with a
>   TID identical to an existing entry. While that shouldn't ever happen, it has
>   been reported to happen when the index is inconsistent with its table.

Right, and the reason why the index is inconsistent with its table is
probably due to the ill-fated OS update you mentioned; if that was
in-place and unless you REINDEXed all the text-column-based indexes,
this might have lead to index corruption, so REINDEX your database after
you upgraded to the latest minor release of version 13.


Michael



Re: Urgent: Segmentation Fault in PostgreSQL postmaster Process

От
Veerendra Pulapa
Дата:
Hi All,

Is there any way to reproduce the issue on different OS and Different DB versions?

Br,
Veerendra Pulapa | Technical Consultant
M: +91-9949349894 | www.ashnik.com


            



On Wed, Jun 19, 2024 at 1:42 PM Michael Banck <mbanck@gmx.net> wrote:
Hi,

On Wed, Jun 19, 2024 at 10:08:14AM +0200, Laurenz Albe wrote:
> On Wed, 2024-06-19 at 13:32 +0530, Veerendra Pulapa wrote:
> > How do we check code 13.3 and 13.4  nbtdedup.c:800?
> >
> > Regarding this issue can we get any relevant information? Where can we find bug information?
>
> Huh?  PostgreSQL is open source.
>
> I told you it is commit fa675af59f, so you can look at
>
> https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=fa675af59f
>
> It is also listed in the release notes of 13.4:
> https://www.postgresql.org/docs/13/release-13-4.html
>
> - Harden B-tree posting list split code against corrupt data (Peter Geoghegan)
>
>   Throw an error, rather than crashing, for an attempt to insert an item with a
>   TID identical to an existing entry. While that shouldn't ever happen, it has
>   been reported to happen when the index is inconsistent with its table.

Right, and the reason why the index is inconsistent with its table is
probably due to the ill-fated OS update you mentioned; if that was
in-place and unless you REINDEXed all the text-column-based indexes,
this might have lead to index corruption, so REINDEX your database after
you upgraded to the latest minor release of version 13.


Michael

______________________________________________________________________________________
This email may contain confidential, privileged or copyright material and is solely for the use of the intended recipient(s). If you are not the rightful recipient of this email, please delete this email immediately and inform the recipient.