Ok, got the default database (postgres) running.
Trying to create a “user” database for the application…
Can anyone spot what im doing wrong here?
createdb -e -D /pgsql/DEV -E UTF8 -l en_US.UTF-8 -O postgres DEV
CREATE DATABASE "DEV" OWNER postgres TABLESPACE "/pgsql/DEV" ENCODING 'UTF8' LC_COLLATE 'en_US.UTF-8' LC_CTYPE 'en_US.UTF-8';
createdb: database creation failed: ERROR: tablespace "/pgsql/DEV" does not exist
I have a filesystem dedicated for this database:
$ df -hlTP /pgsql
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/pgsql-pgsql ext4 126G 61M 126G 1% /pgsql
It’s owned by the postgres account, and it’s currently empty.
$ ls -ld /pgsql
drwxr-xr-x. 3 postgres postgres 4096 Feb 22 11:24 /pgsql/