postgres.git / summary / log / commit / refs
commit 3a19f13cc0a30f47aa64c47c8cda1e50d90ca18f
Author: Amit Kapila <akapila@postgresql.org>
Date: Mon Aug 30 04:37:26 2021 +0000
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
src/backend/replication/logical/origin.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/backend/replication/logical/origin.c b/src/backend/replication/logical/origin.c
index dd650cb4968..c7e514b94d2 100644
--- a/src/backend/replication/logical/origin.c
+++ b/src/backend/replication/logical/origin.c
@@ -756,7 +756,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)));
[parent: 978998dbde2a]