diff options
author | Peter Eisentraut | 2023-03-17 09:14:16 +0000 |
---|---|---|
committer | Peter Eisentraut | 2023-03-17 09:33:09 +0000 |
commit | de4d456b406bf502341ef526710d3f764b41e2c8 (patch) | |
tree | 9a5ae6a1fb699d41d38b430dab4d2b6dfa716419 /src/backend/replication/slot.c | |
parent | 39a3bdc9eba50628cecb7e3cada95271180c8744 (diff) |
Improve several permission-related error messages.
Mainly move some detail from errmsg to errdetail, remove explicit
mention of superuser where appropriate, since that is implied in most
permission checks, and make messages more uniform.
Author: Nathan Bossart <[email protected]>
Discussion: https://www.postgresql.org/message-id/20230316234701.GA903298@nathanxps13
Diffstat (limited to 'src/backend/replication/slot.c')
-rw-r--r-- | src/backend/replication/slot.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/replication/slot.c b/src/backend/replication/slot.c index 3506b77cc7c..2293c0c6fc3 100644 --- a/src/backend/replication/slot.c +++ b/src/backend/replication/slot.c @@ -1143,7 +1143,9 @@ CheckSlotPermissions(void) if (!has_rolreplication(GetUserId())) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("must be superuser or replication role to use replication slots"))); + errmsg("permission denied to use replication slots"), + errdetail("Only roles with the %s attribute may use replication slots.", + "REPLICATION"))); } /* |