pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
can not create a tablespace from psql
3+ messages / 3 participants
[nested] [flat]

* can not create a tablespace from psql
@ 2011-03-26 01:10 hyelluas <helen_yelluas@mcafee.com>
  2011-03-26 01:17 ` Re: can not create a tablespace from psql Rosser Schwarz <rosser.schwarz@gmail.com>
  2011-03-26 03:46 ` Re: can not create a tablespace from psql Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 3+ messages in thread

From: hyelluas @ 2011-03-26 01:10 UTC (permalink / raw)
  To: pgsql-admin

Hello,

I want to create a tablespace from a command line.
I created the directory and set chmod to 0700 , still could not do it.
I can create a tablespace from Admin GUI, not from psql

I'm using PostgreSQL 8.4.6 on RedHat 5.4

[root@Prof20_52_91 data]# ls -ltr psql
total 12
drwx------  7 postgres root     4096 Mar 24 11:41 profiler
drwx------  2 postgres postgres 4096 Mar 25 16:50 my_test
drwx------  2 postgres postgres 4096 Mar 25 16:52 my_test1
[root@Prof20_52_91 data]# chmod 0700 /data/psql/my_test1
[root@Prof20_52_91 data]# su - postgres
-bash-3.00$ psql
psql (8.4.6)
Type "help" for help.

postgres=# create tablespace my_test1 OWNER postgres location
'/data/pgsql/my_test1';
ERROR:  could not set permissions on directory "/data/pgsql/my_test1": No
such file or directory
postgres=#
  
I need to create the tablespace from the script.

thank you for help
Helen


--
View this message in context: http://postgresql.1045698.n5.nabble.com/can-not-create-a-tablespace-from-psql-tp4265091p4265091.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: can not create a tablespace from psql
  2011-03-26 01:10 can not create a tablespace from psql hyelluas <helen_yelluas@mcafee.com>
@ 2011-03-26 01:17 ` Rosser Schwarz <rosser.schwarz@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Rosser Schwarz @ 2011-03-26 01:17 UTC (permalink / raw)
  To: hyelluas <helen_yelluas@mcafee.com>; +Cc: pgsql-admin

On Fri, Mar 25, 2011 at 7:10 PM, hyelluas <helen_yelluas@mcafee.com> wrote:

> [root@Prof20_52_91 data]# ls -ltr psql

> postgres=# create tablespace my_test1 OWNER postgres location
> '/data/pgsql/my_test1';
> ERROR:  could not set permissions on directory "/data/pgsql/my_test1": No
> such file or directory

When you say 'ls', you're in a directory named 'data'.  Your CREATE
TABLESPACE statement is looking for '/data/pgsql/my_test1'.
Double-check your path and try again.

rls

-- 
:wq



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: can not create a tablespace from psql
  2011-03-26 01:10 can not create a tablespace from psql hyelluas <helen_yelluas@mcafee.com>
@ 2011-03-26 03:46 ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 3+ messages in thread

From: Tom Lane @ 2011-03-26 03:46 UTC (permalink / raw)
  To: hyelluas <helen_yelluas@mcafee.com>; +Cc: pgsql-admin

hyelluas <helen_yelluas@mcafee.com> writes:
> I want to create a tablespace from a command line.
> I created the directory and set chmod to 0700 , still could not do it.

> [root@Prof20_52_91 data]# chmod 0700 /data/psql/my_test1

... that says "psql" ...

> postgres=# create tablespace my_test1 OWNER postgres location
> '/data/pgsql/my_test1';
> ERROR:  could not set permissions on directory "/data/pgsql/my_test1": No
> such file or directory

... that says "pgsql" ...

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2011-03-26 03:46 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-03-26 01:10 can not create a tablespace from psql hyelluas <helen_yelluas@mcafee.com>
2011-03-26 01:17 ` Rosser Schwarz <rosser.schwarz@gmail.com>
2011-03-26 03:46 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox