About a recently-added permission-related error message

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: About a recently-added permission-related error message
Date: 2023-03-20 08:05:41
Message-ID: 20230320.170541.1446670788521796869.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I found an error message added by de4d456b406bf502341ef526710d3f764b41e2c8.

When I incorrectly configured the primary_conninfo with the wrong
user, I received the following message on the server logs of both
servers involved in a physical replcation set.

[27022:walsender] FATAL: permission denied to start WAL sender
[27022:walsender] DETAIL: Only roles with the REPLICATION attribute may start a WAL sender process.

I'm not sure if adding the user name in the log prefix is a common
practice, but without it, the log line might not have enough
information. Unlike other permission-related messages, this message is
not the something human operators receive in response to their
actions. It seems similar to connection authorization logs where the
user name is important. So, I'd like to propose the following
alternative.

[27022:walsender] DETAIL: The connection user "r1" requires the REPLICATION attribute.

What do you think about this change?

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

Attachment Content-Type Size
change_a_permission_related_error_message.diff text/x-patch 627 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2023-03-20 08:17:27 Re: Timeline ID hexadecimal format
Previous Message Richard Guo 2023-03-20 08:04:31 Re: Missing rules for queryjumblefuncs.{funcs,switch}.c for maintainer-clean