Setting the role for NOLOGIN is probably your best route. You could also revoke their privileges on any database object, if you were especially concerned.
—
Jay
Sent from my iPad
On May 4, 2020, at 7:30 AM, Rajin Raj <rajin.raj@opsveda.com> wrote:
Hi,
Is there any option to deactivate/disable a user id in Postgres?
I can think of below two options,
ALTER USER <user_id> WITH CONNECTION LIMIT 0;
ALTER USER <user_id> WITH NOLOGIN
Is there any better approach?