Discussion:
Slowly making progress
Ron Watkins
2018-02-23 16:51:25 UTC
Permalink
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/
David G. Johnston
2018-02-23 17:06:24 UTC
Permalink
Post by Ron Watkins
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
The TABLESPACE clause wants the name of an existing tablespace - not a
non-existence path. Tablespaces are objects in their own right.

​https://www.postgresql.org/docs/9.6/static/sql-createtablespace.html

​https://www.postgresql.org/docs/9.6/static/sql-createdatabase.html
​
David J.
Ron Watkins
2018-02-23 17:48:23 UTC
Permalink
Thanks, got it working now. As I am a newbie, I didn’t know about the tablespace requirement.

You guys are very helpful. Thanks





From: David G. Johnston [mailto:***@gmail.com]
Sent: Friday, February 23, 2018 10:06 AM
To: Ron Watkins
Cc: pgsql-***@lists.postgresql.org
Subject: Re: Slowly making progress



On Fri, Feb 23, 2018 at 9:51 AM, Ron Watkins <***@gmail.com> wrote:

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



The TABLESPACE clause wants the name of an existing tablespace - not a non-existence path. Tablespaces are objects in their own right.



​https://www.postgresql.org/docs/9.6/static/sql-createtablespace.html



​https://www.postgresql.org/docs/9.6/static/sql-createdatabase.html

​

David J.
David G. Johnston
2018-02-23 18:02:57 UTC
Permalink
Was the lack of knowledge do to a failure to read or a failure to
understand chapter 22 in the docs? It's been a while since I've read it
but it covers all of this material seemingly quite well.

https://www.postgresql.org/docs/10/static/managing-databases.html

David J.
Post by Ron Watkins
Thanks, got it working now. As I am a newbie, I didn’t know about the
tablespace requirement.
You guys are very helpful. Thanks
*Sent:* Friday, February 23, 2018 10:06 AM
*To:* Ron Watkins
*Subject:* Re: Slowly making progress
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
The TABLESPACE clause wants the name of an existing tablespace - not a
non-existence path. Tablespaces are objects in their own right.
​https://www.postgresql.org/docs/9.6/static/sql-createtablespace.html
​https://www.postgresql.org/docs/9.6/static/sql-createdatabase.html
​
David J.
Ron Watkins
2018-02-23 18:06:23 UTC
Permalink
Failure to read due to lack of time.

As with many projects, postgres was thrown in my lap just a few days ago and im expected to have a working fully-functional setup in just a few days
 I have no idea what im doing but somehow im expected to be the expert




From: David G. Johnston [mailto:***@gmail.com]
Sent: Friday, February 23, 2018 11:03 AM
To: Ron Watkins
Cc: pgsql-***@lists.postgresql.org
Subject: Re: Slowly making progress



Was the lack of knowledge do to a failure to read or a failure to understand chapter 22 in the docs? It's been a while since I've read it but it covers all of this material seemingly quite well.



https://www.postgresql.org/docs/10/static/managing-databases.html



David J.

On Friday, February 23, 2018, Ron Watkins <***@gmail.com> wrote:

Thanks, got it working now. As I am a newbie, I didn’t know about the tablespace requirement.

You guys are very helpful. Thanks





From: David G. Johnston [mailto:***@gmail.com]
Sent: Friday, February 23, 2018 10:06 AM
To: Ron Watkins
Cc: pgsql-***@lists.postgresql.org
Subject: Re: Slowly making progress



On Fri, Feb 23, 2018 at 9:51 AM, Ron Watkins <***@gmail.com> wrote:

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



The TABLESPACE clause wants the name of an existing tablespace - not a non-existence path. Tablespaces are objects in their own right.



​https://www.postgresql.org/docs/9.6/static/sql-createtablespace.html



​https://www.postgresql.org/docs/9.6/static/sql-createdatabase.html

​

David J.

Loading...