mirror of
https://github.com/postgres/postgres.git
synced 2025-05-01 01:04:50 +03:00
pg_upgrade: Upgrade an Assert to a real 'if' test
It seems possible for the condition being tested to be true in production, and nobody would never know (except when some data eventually becomes corrupt?). Author: Álvaro Herrera <alvherre@alvh.no-ip.org> Discussion: https://postgr.es/m//202109040001.zky3wgv2qeqg@alvherre.pgsql
This commit is contained in:
parent
caaeb88ff7
commit
9814c708c6
@ -102,7 +102,9 @@ extractPageMap(const char *datadir, XLogRecPtr startpoint, int tliIndex,
|
|||||||
* If 'endpoint' didn't point exactly at a record boundary, the caller
|
* If 'endpoint' didn't point exactly at a record boundary, the caller
|
||||||
* messed up.
|
* messed up.
|
||||||
*/
|
*/
|
||||||
Assert(xlogreader->EndRecPtr == endpoint);
|
if (xlogreader->EndRecPtr != endpoint)
|
||||||
|
pg_fatal("end pointer %X/%X is not a valid end point; expected %X/%X",
|
||||||
|
LSN_FORMAT_ARGS(endpoint), LSN_FORMAT_ARGS(xlogreader->EndRecPtr));
|
||||||
|
|
||||||
XLogReaderFree(xlogreader);
|
XLogReaderFree(xlogreader);
|
||||||
if (xlogreadfd != -1)
|
if (xlogreadfd != -1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user