Hi,
On Fri, Oct 05, 2018 at 10:26:45AM +0900, Michael Paquier wrote:
> The topic of $subject has been discussed a bit times, resulting in a
> couple of patches on the way:
> https://www.postgresql.org/message-id/20180830200258.GG15446@paquier.xyz
> https://www.postgresql.org/message-id/CABUevEzEKrwPeGK2o-OV4z2MjfT6Cu8cLfA-v1S1j4z8x7WJjg@mail.gmail.com
>
> However nothing has actually happened. Based on the previous feedback,
> attached is an updated patch to do the actual job.
Thanks!
It's too late for v11 though at this point I guess?
I think it would be easy to also test the -r command-line option, as we
already create a table. Something like
|my $relfilenode_corrupted = $node->safe_psql('postgres',
| "SELECT relfilenode FROM pg_class WHERE relname = 'corrupt1'");
[...]
|# Checksums pass solely on that table
|command_ok(['pg_verify_checksums', '-D', $pgdata, '-r', $relfilenode_corrupted],
| "checksum checks for table relfilenode done and passing");
While making sure the $node->stop is between the two.
One nitpick:
> diff --git a/src/bin/pg_verify_checksums/t/002_actions.pl b/src/bin/pg_verify_checksums/t/002_actions.pl
> new file mode 100644
> index 0000000000..7423595181
> --- /dev/null
> +++ b/src/bin/pg_verify_checksums/t/002_actions.pl
[...]
> +# Control file should know that checksums are disabled.
> +command_like(['pg_controldata', $pgdata],
> + qr/Data page checksum version:.*1/,
> + 'checksums enabled in control file');
That comment should read 'that checksums are enabled', right?
Otherwise, LGTM and I've tested it without finding any problems.
Michael
--
Michael Banck
Projektleiter / Senior Berater
Tel.: +49 2166 9901-171
Fax: +49 2166 9901-100
Email: michael.banck@credativ.de
credativ GmbH, HRB Mönchengladbach 12080
USt-ID-Nummer: DE204566209
Trompeterallee 108, 41189 Mönchengladbach
Geschäftsführung: Dr. Michael Meskes, Jörg Folz, Sascha Heuer
Unser Umgang mit personenbezogenen Daten unterliegt
folgenden Bestimmungen: https://www.credativ.de/datenschutz