Difference between revisions of "SW:PostgreSQL"
(Created page with "=PostgreSQL= __TOC__ ==Description== PostgreSQL is a powerful, open source object-relational database system. * Homepage: [https://www.postgresql.org// https://www.postgresql...") |
(→PostgreSQL) |
||
Line 9: | Line 9: | ||
===PostgreSQL Module=== | ===PostgreSQL Module=== | ||
− | TAMU HPRC currently supports the user of PostgreSQL though the PostgreSQL modules. There are | + | TAMU HPRC currently supports the user of PostgreSQL though the PostgreSQL modules. There are several PostgreSQL modules available on Ada and Terra. |
Line 29: | Line 29: | ||
(6) execute your sql statments in psql | (6) execute your sql statments in psql | ||
(7) pg_ctl -D /scratch/user/yangliu/Test/postresql/test.db stop | (7) pg_ctl -D /scratch/user/yangliu/Test/postresql/test.db stop | ||
+ | |||
+ | You may set password for your database if it is needed. This is the commands | ||
+ | for the first time set up of postgres. After this, you only need to startup the | ||
+ | server, connect to it, and stop it. You only need to initdb, createdb for one | ||
+ | time. Let us know If you have further questions. |
Revision as of 08:46, 29 March 2018
PostgreSQL
Description
PostgreSQL is a powerful, open source object-relational database system.
- Homepage: https://www.postgresql.org//
Access
PostgreSQL is open to all HPRC users.
PostgreSQL Module
TAMU HPRC currently supports the user of PostgreSQL though the PostgreSQL modules. There are several PostgreSQL modules available on Ada and Terra.
You can learn more about the module system on our SW:Modules page.
PostgreSQL on Ada
1) module load PostgreSQL/9.6.1-GCCcore-6.3.0-Python-2.7.12-bare (2) initdb -D /scratch/user/yangliu/Test/postresql/test.db (3) pg_ctl -o "-p 9999" -D /scratch/user/yangliu/Test/postresql/test.db -l /scratch/user/yangliu/Test/postresql/test.log start #comment: the -o provides extra options. In this example, the extra option is the port by -p. the -D option specified where is the database file. The -l option specify the log file for the database instance. (4) createdb yang -D /scratch/user/yangliu/Test/postresql/test.db -p 9999 (5) psql -d yang -p 999 (6) execute your sql statments in psql (7) pg_ctl -D /scratch/user/yangliu/Test/postresql/test.db stop
You may set password for your database if it is needed. This is the commands for the first time set up of postgres. After this, you only need to startup the server, connect to it, and stop it. You only need to initdb, createdb for one time. Let us know If you have further questions.