Re: [PATCH] Use role name "system_user" instead of "user" for unsafe_tests

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Aleksander Alekseev <aleksander(at)timescale(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andrew Dunstan <andrew(at)dunslane(dot)net>
Subject: Re: [PATCH] Use role name "system_user" instead of "user" for unsafe_tests
Date: 2023-04-11 20:03:37
Message-ID: 508365.1681243417@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Aleksander Alekseev <aleksander(at)timescale(dot)com> writes:
>> I don't think we can protect against all possible user names. Wouldn't it be better to run the tests under an OS user with a different name, like "marmaduke"? ("user" is a truly terrible default user name).

> 100% agree. The point is not to protect against all possible user
> names but merely to reduce the likelihood of the problem.

It only reduces the likelihood if you assume that "system_user"
is less likely than "user" as a choice of OS user name to run
the tests under. That seems like a debatable assumption;
perhaps it's actually *more* likely.

Whether we need to have a test for this at all is perhaps a
more interesting argument.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2023-04-11 20:10:57 Re: Minimal logical decoding on standbys
Previous Message Tom Lane 2023-04-11 19:59:08 Re: v12: ERROR: subplan "InitPlan 2 (returns $4)" was not initialized