improve error message in secondaries

(cherry picked from commit 6f4686c741467b5c8bd6ca15c0788d8db856392a)
pull/4206/head
Sait Talha Nisanci 2020-07-13 16:16:40 +03:00
parent 388893ce5e
commit 4c90dbbd88
2 changed files with 2 additions and 2 deletions

View File

@ -282,7 +282,7 @@ EnsureModificationsCanRun(void)
if (RecoveryInProgress() && !WritableStandbyCoordinator)
{
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)

View File

@ -11,7 +11,7 @@ CREATE TABLE local (a int, b int);
-- inserts normally do not work on a standby coordinator
INSERT INTO the_table (a, b, z) VALUES (1, 2, 2);
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
SET citus.writable_standby_coordinator TO on;
INSERT INTO the_table (a, b, z) VALUES (1, 2, 2);