improve error message in secondaries (#4025)

pull/3698/head
SaitTalhaNisanci 2020-07-13 19:18:57 +03:00 committed by GitHub
parent 449d1f0e91
commit 76ddb85545
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -282,7 +282,7 @@ EnsureModificationsCanRun(void)
if (RecoveryInProgress() && !WritableStandbyCoordinator) if (RecoveryInProgress() && !WritableStandbyCoordinator)
{ {
ereport(ERROR, (errmsg("writing to worker nodes is not currently allowed"), ereport(ERROR, (errmsg("writing to worker nodes is not currently allowed"),
errdetail("the database is in recovery mode"))); errdetail("the database is read-only")));
} }
if (ReadFromSecondaries == USE_SECONDARY_NODES_ALWAYS) if (ReadFromSecondaries == USE_SECONDARY_NODES_ALWAYS)

View File

@ -11,7 +11,7 @@ CREATE TABLE local (a int, b int);
-- inserts normally do not work on a standby coordinator -- inserts normally do not work on a standby coordinator
INSERT INTO the_table (a, b, z) VALUES (1, 2, 2); INSERT INTO the_table (a, b, z) VALUES (1, 2, 2);
ERROR: writing to worker nodes is not currently allowed ERROR: writing to worker nodes is not currently allowed
DETAIL: the database is in recovery mode DETAIL: the database is read-only
-- we can allow DML on a writable standby coordinator -- we can allow DML on a writable standby coordinator
SET citus.writable_standby_coordinator TO on; SET citus.writable_standby_coordinator TO on;
INSERT INTO the_table (a, b, z) VALUES (1, 2, 2); INSERT INTO the_table (a, b, z) VALUES (1, 2, 2);