Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jVZcQ-0004df-RZ for pgsql-admin@arkaria.postgresql.org; Mon, 04 May 2020 11:50:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jVZcP-0004hA-NN for pgsql-admin@arkaria.postgresql.org; Mon, 04 May 2020 11:50:41 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jVZcP-0004h3-G6 for pgsql-admin@lists.postgresql.org; Mon, 04 May 2020 11:50:41 +0000 Received: from mail-qk1-x72b.google.com ([2607:f8b0:4864:20::72b]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jVZcJ-0001m7-8p for pgsql-admin@lists.postgresql.org; Mon, 04 May 2020 11:50:40 +0000 Received: by mail-qk1-x72b.google.com with SMTP id c10so5106752qka.4 for ; Mon, 04 May 2020 04:50:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=aIWa0uHGzP9waqlqV96zVizRZwhYiXI1jO08uyAyFoI=; b=nWJ6p3FDONm+LN8vlsxUKki4SwAfJ4qSUb6rKfDLeGro9x4ahOFXGUe/Zp4Tj02LzK 4qKPiuhMXm3SrmSVvJ4m3BffU5fWoDeJCSFGo3AUYAXiZLQW17vgCuTlmFItC5Zi1C4D Jxj7fMS5FPcXe4DWsinrN8eTCVxR9VlN6l4rw5lpH19okCPjFWhR5Pds6UHtFMP+9AHZ C5o30xsIj8m7I+EyAkEoFd5Q1YrA98XDimXMEWfY+yKrTp5rfhvIgTchBLlQL6IIbMBD b3PkU8M7D8B1y3mglX+2dvQkX7noXig45uYu2fX8/8p07G1odhuuze0qJVZHmrYmR/NG 9gsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=aIWa0uHGzP9waqlqV96zVizRZwhYiXI1jO08uyAyFoI=; b=cy/7LpgvupQAYhfIz3tKJziBK84q1CPkKWIgHc4SZSJbMlZ37d9tTICa95Km3HEwUM WKacRg/mu/8s97U6+4Lpt/MBxgtj+pUmELsZkr53BWJ+u901C0AsDarN762zWRQY3MMa j1WgjPrrge43TukQxUOSY9lhxuGLV0oTZBYfmqL4VRqWnAvAphWDQQLuVumI+59L5eNr DcrF9JCoS/Xnxqxx/W9WLX6sem9ZK6bfinecX8KEoEHiijVS/hX/GrRsPurRrtqUlZJr dLUDMUwWVko74+5yU4j4c0MveHLneMTBIUH1htMCYecnPqgN2LRP7sIUVsHOuYPAHCBP nOzg== X-Gm-Message-State: AGi0PuaXh81h6t3kiX58Y9D+aoG7Ul3IDDx7FngTRMGrpbVRJcLXaS4i vilw+VXEkdBWt8HhEurrwxA1JQnG X-Google-Smtp-Source: APiQypKfTCh2ST8xqmEhbI7I2OjxLdC/ZSpQVs0VwmqAqi1dTUdTn8kIqMdG6v/wlOGfG604gNXNwQ== X-Received: by 2002:a05:620a:1647:: with SMTP id c7mr15917706qko.473.1588593034085; Mon, 04 May 2020 04:50:34 -0700 (PDT) Received: from ?IPv6:2603:9000:f609:a03d:b982:9e9:17b5:f0bd? ([2603:9000:f609:a03d:b982:9e9:17b5:f0bd]) by smtp.gmail.com with ESMTPSA id a16sm3743720qko.92.2020.05.04.04.50.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 May 2020 04:50:33 -0700 (PDT) Content-Type: multipart/alternative; boundary=Apple-Mail-92EE28CD-D001-4483-91A0-29D0E648FD3E Content-Transfer-Encoding: 7bit From: John Scalia Mime-Version: 1.0 (1.0) Subject: Re: Deactivate/disable User id in Postgres Date: Mon, 4 May 2020 07:50:30 -0400 Message-Id: <1590FC39-7BA9-4B29-953E-7C01E70E52E9@gmail.com> References: Cc: pgsql-admin@lists.postgresql.org In-Reply-To: To: Rajin Raj X-Mailer: iPad Mail (17D50) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail-92EE28CD-D001-4483-91A0-29D0E648FD3E Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Setting the role for NOLOGIN is probably your best route. You could also rev= oke their privileges on any database object, if you were especially concerne= d. =E2=80=94 Jay Sent from my iPad > On May 4, 2020, at 7:30 AM, Rajin Raj wrote: >=20 > =EF=BB=BF > Hi, >=20 > Is there any option to deactivate/disable a user id in Postgres? > I can think of below two options,=20 >=20 > ALTER USER WITH CONNECTION LIMIT 0; > ALTER USER WITH NOLOGIN >=20 > Is there any better approach?=20 >=20 > Regards, > Rajin=20 --Apple-Mail-92EE28CD-D001-4483-91A0-29D0E648FD3E Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Setting the role for NOLOGIN is probably yo= ur best route. You could also revoke their privileges on any database object= , if you were especially concerned.
=E2=80=94
Jay

Sent from my iPad

On May 4, 2020, at 7:30 AM, Rajin Raj <rajin.raj@opsveda.com> wro= te:

=EF= =BB=BF
Hi,

Is there any o= ption to deactivate/disable a user id in Postgres?
I can think o= f below two options, 

ALTER USER <user_= id> WITH CONNECTION LIMIT 0;
ALTER USER <user_id> WITH N= OLOGIN

Is there any better approach? 

R= egards,
Rajin 
= --Apple-Mail-92EE28CD-D001-4483-91A0-29D0E648FD3E--