PostgreSQL

[PostgreSQL] 단일 사용자 모드 (single mode) 란 ?

리거니 2023. 4. 19. 17:25
단일 사용자 모드 ( Single Mode )



     1] 디버그 작업이나, 장애 복구 때 사용한다
    
     2] 세션 사용자 ID를 1로 처리하며, 명령을 실행한 사용자가 슈퍼유저(관리자) 권한을 가진다. 
     

     3] 이 사용자는 다중 사용자 환경에서는 없는 사용자이며, 손상된 시스템 카탈로그를 수동으로 복구할 때 단일 사용자             모드로 실행할 수 있다.   

     4] 단일 사용자 모드에서는 자동 체크포인트나, 복제 같은 백그라운드 프로세스가 실행되지 않는다.

     


[postgres@localhost data]$ postgres --help
postgres is the PostgreSQL server.

Usage:
  postgres [OPTION]...

Options for single-user mode:
  --single           selects single-user mode (must be first argument)
  DBNAME             database name (defaults to user name)
  -d 0-5             override debugging level
  -E                 echo statement before execution
  -j                 do not use newline as interactive query delimiter
  -r FILENAME        send stdout and stderr to given file

 

 

postgres --single -D /usr/local/pgsql/data 기타옵션들 my_database

[postgres@localhost  data] postgres --single -O -D $PGDATA $rigun

 

 

postgres

postgres postgres — PostgreSQL database server Synopsis postgres [option...] Description postgres is the PostgreSQL database server. In order for a …

www.postgresql.org