Improve error message in WAL sender
authorPeter Eisentraut <peter_e@gmx.net>
Wed, 13 Sep 2017 12:31:03 +0000 (08:31 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Wed, 13 Sep 2017 12:31:03 +0000 (08:31 -0400)
The previous error message when attempting to run a general SQL command
in a physical replication WAL sender was a bit sloppy.

Reported-by: Fujii Masao <masao.fujii@gmail.com>
src/backend/replication/walsender.c

index db346e6edbdbcc6a95dd51ca1cb3b34849080e5e..1fbe8ed71b05d5c2f22a607e7e26ada5b70e977e 100644 (file)
@@ -1545,7 +1545,7 @@ exec_replication_command(const char *cmd_string)
        case T_SQLCmd:
            if (MyDatabaseId == InvalidOid)
                ereport(ERROR,
-                       (errmsg("not connected to database")));
+                       (errmsg("cannot execute SQL commands in WAL sender for physical replication")));
 
            /* Tell the caller that this wasn't a WalSender command. */
            return false;