You are here
PostgreSQL server runs on our "db4" machine which is not accessible by SSH. Every user who has an account on postgres can make a connection to postgres server only through bugaboo compute nodes and joffre machines. No postgres connection is allowed from the bugaboo headnode .
PostgreSQL account and connection
PostgreSQL uses indent to authenticate the connect to the server therefore no password is needed to connect. To create an account for PostgeSQL please send an email to email@example.com. To connect to postgres server from bugaboo, e.g. through a interactive job submission please run:
#psql -d db_[username]
where db_[username] is the name of the default database that is created by an administrator at the time of opening an account. Users are allowed to create database as many as they need, however all database created by users need to be within a space table called "tbsp_allusers". The name of databases should start with db_[username] where [username] is the corresponding westgrid username. The following linux commands create and delete a database called [database] within space table "tbsp_allusers" respectively:
# createdb [database] -D tbsp_allusers
# dropdb [database]
Note that the above command cannot be ran from the bugaboo headnode. Therefore you can run them either by submitting a interactive job or through the PBS script. Alternatively you can create or delete database within postgress. To connect to postgres from a perl modules for example from one of BioPerl
modules the command line should contains "-a" and "-d" options as following:
-a DBI::Pg -d dbi:Pg:dbname=[database name] ....
where [database name] is the name of the database which should be already created by the user. In order to connect to postres from gbrowse, the corresponding line in configure file should contains:
db_args = -dsn dbi:Pg:dbname=[database name ]