설문조사
PostgreSQL/PPAS 관련 듣고 싶은 교육은


총 게시물 73건, 최근 0 건
   

유저 로그인 막기

글쓴이 : PostgresDBA 날짜 : 2013-06-24 (월) 15:44 조회 : 5672
오라클에서는 alter user scott account lock; 명령으로 scott 계정을 락킹할수 있습니다.
그러면 scott 계정으로 오라클에 로그인이 불가능합니다.

PostgreSQL 에서는 어떻게 할까요?
superuser 권한 유저로 다음과 같은 명령을 내리면 됩니다.

postgres=# alter user scott connection limit 0;  
ALTER ROLE
postgres=#

scott 유저로 PostgreSQL 로그인 시도시에 아래와 같은 에러가 발생합니다.

psql: FATAL:  too many connections for role "scott"

다시 로그인 가능하도록 하려면 다음과 같이 합니다.
alter user scott connection limit -1


   

postgresdba.com