On Thu, 2025-10-16 at 11:07 +0000, Ishan Arunkumar Joshi wrote:
> We are using PG16.9 in Patroni Postgres setup in production. Last night we have face
> an issue [various data corruption errors]
>
> We had to drop the table “impacted_table” from database once the database is up.
>
> however we are not able to identify exact root cause behind “segmentation fault”
> error for this table and need expert advice to find the root case and also need
> suggestions to prevention steps.
By dropping the table, you have probably destroyed the evidence needed for that.
If you have a file system backup of the corrupted state, an expert might be able
to identify probable causes.
One prevention step would have been to run the latest minor release (currently 16.10).
Other than that, make sure that you have a good backup that is occasionally tested
and make sure that the backup is monitored (I have seen cases where the backup was a
daily pg_dump, and only when the corruption surfaced, people realized that the pg_dump
had been failing for the exact same reason...).
Yours,
Laurenz Albe