pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Error out in pg_checksums on incompatible block size
Date: Mon, 18 Mar 2019 00:13:06 +0000
Message-ID: <E1h5ftq-0007OA-PE@gemulon.postgresql.org> (raw)

Error out in pg_checksums on incompatible block size

pg_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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/fa3395659561b564051a2bbd3997de8e2923c8e3

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



Message-ID: <E1h5ftq-0007OA-PE@gemulon.postgresql.org>
Permalink:  ../E1h5ftq-0007OA-PE@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1h5ftq-0007OA-PE@gemulon.postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: Error out in pg_checksums on incompatible block size
  In-Reply-To: <E1h5ftq-0007OA-PE@gemulon.postgresql.org>
  References: <E1h5ftq-0007OA-PE@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox