Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

命令行指令

Linux命令行

  • 查看DB实例状态

    pg_ctl status
    
  • 切到超级用户

    su - postgres
    
  • 查看5432端口下有多少数据库

    psql –l
    
  • 搜索DB的安装目录

    find / -name initdb
    
  • 查看有多少DB实例在运行

    find / -name postgresql.conf
    
  • 数据库备份

    pg_dump dbname > outfile