git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 5616300) | patch
pg_controldata: Prevent division-by-zero errors
2018年3月21日 16:14:53 +0000 (12:14 -0400)
2018年3月21日 16:21:23 +0000 (12:21 -0400)
commit 4731d848f23e08a9396b4831d13fbb6dd460faf2
pg_controldata: Prevent division-by-zero errors

If the control file is corrupted and specifies the WAL segment size
to be 0 bytes, calculating the latest checkpoint's REDO WAL file
will fail with a division-by-zero error. Show it as "???" instead.

Also reword the warning message a bit and send it to stdout, like the
other pre-existing warning messages.

Add some tests for dealing with a corrupted pg_control file.

Author: Nathan Bossart <bossartn@amazon.com>, tests by me
src/bin/pg_controldata/pg_controldata.c diff | blob | blame | history
src/bin/pg_controldata/t/001_pg_controldata.pl diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /