PostgreSQL

From Dryad wiki
Revision as of 13:22, 11 August 2016 by Ryan Scherle (talk | contribs) (Postgres configuration)

Jump to: navigation, search

DSpace uses the PostgreSQL database by default.

Common Commands

\c [name]
Connect to a database (like "dspace")
\d [name]
Describes the format of a table, view, sequence, etc.
\dt
List all tables in the database
\h 
help with postgres
\q 
quit
\? 
help with sql

Postgres configuration

On the NCSU servers:

  • binaries /usr/pgsql-9.5
  • data /var/lib/pgsql/9.5/data
  • automatic backups in /var/lib/pgsql/9.5/backups/
  • To use the postgres account in the database, must be logged in to the postgres account in the shell, then just run 'pgsql'
  • To be sure to stop postgres, login to the postgres shell account and run /usr/pgsql-9.5/bin/pg_ctl stop -D /var/lib/pgsql/9.5/data

See Also