From: Amit Kapila Date: Mon, 30 Aug 2021 04:30:03 +0000 (+0530) Subject: Fix incorrect error code in StartupReplicationOrigin(). X-Git-Tag: REL_10_19~77 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=16cad4be32a44b9d05c594d1f53a60ea6e0f58b6;p=thirdparty%2Fpostgresql.git Fix incorrect error code in StartupReplicationOrigin(). ERRCODE_CONFIGURATION_LIMIT_EXCEEDED was used for checksum failure, use ERRCODE_DATA_CORRUPTED instead. Reported-by: Tatsuhito Kasahara Author: Tatsuhito Kasahara Backpatch-through: 9.6, where it was introduced Discussion: https://postgr.es/m/CAP0=ZVLHtYffs8SOWcFJWrBGoRzT9QQbk+_aP+E5AHLNXiOorA@mail.gmail.com --- diff --git a/src/backend/replication/logical/origin.c b/src/backend/replication/logical/origin.c index ffe14886cd8..725ad9126a8 100644 --- a/src/backend/replication/logical/origin.c +++ b/src/backend/replication/logical/origin.c @@ -787,7 +787,7 @@ StartupReplicationOrigin(void) FIN_CRC32C(crc); if (file_crc != crc) ereport(PANIC, - (errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED), + (errcode(ERRCODE_DATA_CORRUPTED), errmsg("replication slot checkpoint has wrong checksum %u, expected %u", crc, file_crc)));