diff options
author | Amit Kapila <akapila@postgresql.org> | 2021-08-30 09:26:49 +0530 |
---|---|---|
committer | Amit Kapila <akapila@postgresql.org> | 2021-08-30 09:26:49 +0530 |
commit | 8ba3bad4c362ef71bf6a13ecf4ae5e26066a4876 (patch) | |
tree | 32ab7bedc938c23a3a10f0222fa6ad82d31f7cc9 /src | |
parent | 9a33ed8fa10354bdb3f12d87ccd9f387bec338d1 (diff) | |
download | postgresql-8ba3bad4c362ef71bf6a13ecf4ae5e26066a4876.tar.gz postgresql-8ba3bad4c362ef71bf6a13ecf4ae5e26066a4876.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/replication/logical/origin.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/replication/logical/origin.c b/src/backend/replication/logical/origin.c index 1ca4479605c..997fde3e2f2 100644 --- a/src/backend/replication/logical/origin.c +++ b/src/backend/replication/logical/origin.c @@ -784,7 +784,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))); |