Re: error moving table to tablespace (8.0 beta win32 )

From: Christian Traber <christian(at)traber-net(dot)de>
To: Rajesh Kumar Mallah <mallah(at)trade-india(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: error moving table to tablespace (8.0 beta win32 )
Date: 2004-08-11 05:53:20
Message-ID: 4119B450.5040804@traber-net.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers-win32

Rajesh Kumar Mallah wrote:

> are you able to create new tables in the default tablespace ?

Yes, permissions are ok.

looks
> like a permission issue did you initdb a fresh folder see if the
> owner of $PGDATA/data/base is the user that running postmaster
> (usually postgres) . It works fine for me though

initdb was run by windows installer

>
> Regds
> mallah
>
> test=# \d t_b
> Table "public.t_b"
> Column | Type | Modifiers
> --------+---------+-----------
> a | integer |
> Tablespace: "space"
>
> test=# ALTER TABLE t_b SET TABLESPACE pg_default;
> ALTER TABLE
> test=# SELECT version();
> version
> --------------------------------------------------------------------------------------------------------------
> PostgreSQL 8.0.0beta1 on i686-pc-linux-gnu, compiled by GCC gcc (GCC)
> 3.3.2 (Mandrake Linux 10.0 3.3.2-6mdk)
> (1 row)
>
> test=#
>

Maybe its only win32 version?

Here what i tried:

CREATE TABLE test (name varchar(100));
CREATE TABLE

CREATE TABLESPACE test LOCATION 'C:\\tmp\\ts_test';
CREATE TABLESPACE

\db
List of tablespaces
Name | Owner | Location
------------+----------+----------------
pg_default | postgres |
pg_global | postgres |
test | postgres | C:/tmp/ts_test
(3 rows)

ALTER TABLE test SET TABLESPACE test;
ALTER TABLE

\d+ test
Table "public.test"
Column | Type | Modifiers | Description
--------+------------------------+-----------+-------------
name | character varying(100) | |
Contains OIDs: yes
Tablespace: "test"

ALTER TABLE test SET TABLESPACE pg_default;
ERROR: could not create relation 1663/317186/1317654: Permission denied

select version();
version

----------------------------------------------------------------------------------------------------------
PostgreSQL 8.0.0beta1 on i686-pc-mingw32, compiled by GCC gcc.exe
(GCC) 3.2.3 (mingw special 20030504-1)
(1 row)

Thanks and regards
Christian

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2004-08-11 06:14:37 Re: Losing records when server hang
Previous Message Tom Lane 2004-08-11 05:25:58 Re: lock conflicting with another

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Andrew Francis 2004-08-11 07:09:27 libpq build problem with <io.h> on MS VC++ 7.0
Previous Message Tom Lane 2004-08-11 04:26:10 Re: PITR on Win32 - Archive and Restore