pgsql: Error out in pg_verify_checksums on incompatible block size

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Error out in pg_verify_checksums on incompatible block size
Date: 2019-03-18 00:13:06
Message-ID: E1h5ftq-0007OB-PK@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Error out in pg_verify_checksums on incompatible block size

pg_verify_checksums is compiled with a given block size and has a hard
dependency to it per the way checksums are calculated via
checksum_impl.h, and trying to use the tool on a data folder which has
not the same block size would result in incorrect checksum calculations
and/or block read errors, meaning that the data folder is corrupted.
This is harmless as checksums are only checked now, but very confusing
for the user so issue an error properly if the block size used at
compilation and the block size used in the data folder do not match.

Reported-by: Sergei Kornilov
Author: Michael Banck, Michael Paquier
Reviewed-by: Fabien Coelho, Magnus Hagander
Discussion: https://postgr.es/m/20190317054657.GA3357@paquier.xyz
ackpatch-through: 11

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/5864d246099f1619539f20ae53331fbdb772b879

Modified Files
--------------
src/bin/pg_verify_checksums/pg_verify_checksums.c | 9 +++++++++
1 file changed, 9 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2019-03-18 01:36:04 pgsql: Fix pg_rewind when rewinding new database with tables included
Previous Message Alexander Korotkov 2019-03-17 12:09:07 Re: pgsql: Beautify initialization of JsonValueList and JsonLikeRegexContex