Re: pg_verify_checksums -d option (was: Re: pg_verify_checksums -roption)
От | Fabien COELHO |
---|---|
Тема | Re: pg_verify_checksums -d option (was: Re: pg_verify_checksums -roption) |
Дата | |
Msg-id | alpine.DEB.2.21.1809031717240.5293@lancre обсуждение исходный текст |
Ответ на | Re: pg_verify_checksums -d option (was: Re: pg_verify_checksums -roption) (Yugo Nagata <nagata@sraoss.co.jp>) |
Список | pgsql-hackers |
Hello Yugo-san, > I attached the rebased patch. Patch applies cleanly, compiles, "make check" is okay, although there are no specific test for the feature. Indeed, after investigation there is not a SINGLE test for the command:-( I think that some minimal tap-testing should be done. It seems that pg_basebackup tap test is the only one which enables checksums. Maybe a pg_verify_checksum could be added to the "010_pg_basebackup.pl" script. Anyway I tested that it works by hex-editing a file to trigger a fail. Function "atoi" is quite lazy, it accepts "-d 1zzz" as "1". Maybe parsing could be stricter. When the command is started with both "-d 1 -g", it succeeds by checking nothing, which is quite misleading. Probably it should complain that these options are mutually exclusive, or it should check both under -g AND -d 1? The oid of a database is not obvious... You have to query "SELECT oid, *", it is not given by \l or \l+ or "psql -l". About the documentation: "Only validate checksums in the relations in the database with specified OID."... I think that indexes and other possibly toasted values are also checked. I'd suggest "Only validate checksums of objects in the database specified by its OID". "--globel-only" -> "--global-only". ISTM that --help should show options in alphabetical order, however -v is out of order. -- Fabien.
В списке pgsql-hackers по дате отправления: