pg_resetwal: Prevent division-by-zero errors
Peter Eisentraut <peter_e@gmx.net>
pg_resetwal: Prevent division-by-zero errors Handle the case where the pg_control file specifies a WAL segment size of 0 bytes. This would previously have led to a division by zero error. Change this to assume the whole file is corrupt and go to guess everything. Discussion: https://www.postgresql.org/message-id/a6163ad7-cc99-fdd1-dfad-25df73032ab8%402ndquadrant.com
Files
| Path | Change | +/− |
|---|---|---|
| src/bin/pg_resetwal/pg_resetwal.c | modified | +2 −2 |
| src/bin/pg_resetwal/t/002_corrupted.pl | added | +47 −0 |
Discussion
- pg_upgrade to clusters with a different WAL segment size 21 messages · 2017-11-10 → 2018-03-26