public inbox for [email protected]
help / color / mirror / Atom feedFrom: Vladlen Popolitov <[email protected]>
To: Pawel Kudzia <[email protected]>
Cc: [email protected]
Subject: Re: Silent data corruption in PostgreSQL 17 - how to detect it proactively?
Date: Tue, 16 Sep 2025 16:25:00 +0300
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAJYBUS9pUjZbqsndbjdHUNugonfQ4DRr_HEn0QkyTXsds0VLMQ@mail.gmail.com>
References: <CAJYBUS9T=JCVGkb9yXn5GVYC_g-e5mRi4MFoNHKEZV0keuHHwQ@mail.gmail.com>
<[email protected]>
<CAJYBUS9pUjZbqsndbjdHUNugonfQ4DRr_HEn0QkyTXsds0VLMQ@mail.gmail.com>
Pawel Kudzia писал(а) 2025-09-14 15:47:
> On Sun, Sep 14, 2025 at 12:35 PM Laurenz Albe
> <[email protected]> wrote:
>
> gdb stack trace for that process:
>
> #0 0x000055cb571ef444 in hash_search_with_hash_value ()
> #1 0x000055cb5706217a in BufTableLookup ()
Hi,
Probably, it does not hang in function hash_search_with_hash_value(),
probably you caught it in this function in that moment of the time.
This function itself do finite work and returns, it is hard to
harm it by wrong data.
This function is called by code, that goes to leafs of the B+tree.
If this code enters destroyed block, it goes to wrong blocks and
behave unexpectedly. For example, it goes to block zero, that is not
leaf block (meta-page of the index) and probably has a lot of zero.
Btree code get new block address - 0 again, and again goes to block 0.
You have two options:
1) enable checksums (that is highly recommended)
and get error message immediately in case of failure, and restore
database
from backup (and probably consider the change of the provider)
2) continue with disabled checksums, get programs crashes and finally
restore from backup.
Checksum calculation takes ~0.5% of query time, it is not bottleneck
in PostgreSQL.
P.S. Databases have a lot of code, that rely on correctness of original
data on the disk. It is impossible to to check every byte, is it correct
or not.
--
Best regards,
Vladlen Popolitov.
view thread (4+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Silent data corruption in PostgreSQL 17 - how to detect it proactively?
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox