Re: open item: tablespace handing in pg_dump/pg_restore

From: Reini Urban <rurban(at)x-ray(dot)at>
To: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: open item: tablespace handing in pg_dump/pg_restore
Date: 2004-10-04 11:17:29
Message-ID: 41613149.2050507@x-ray.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-cygwin pgsql-hackers pgsql-hackers-win32

Bruce Momjian schrieb:
> Fabien COELHO wrote:
>>Dear hackers,
>>>I'm happy to do the pg_dump changes, assuming Tom gets the SET stuff sorted
>>>out.
>>
>>ISTM that the tablespace handling or ignoring in pg_dump/pg_restore is
>>still an open issue in current CVS head... waiting for a proper
>>implementation after the brain-storming on what seemed to be the
>>consensus, that is to output a separate
>>
>> SET DEFAULT TABLESPACE somewhere;
>>
>>before object creations in the dump/restore command flow.
>>
>>I've noticed that the item does not seem to appear in Bruce's list, thus
>>I'm afraid it might be lost for 8.0 where I think it belongs... hence this
>>little reminder.
>
> It isn't on the open items list because it isn't a _must_ fix for 8.0,
> though it is still in my mailbox. As I remember it is to allow objects
> to be created when the schema doesn't exist, and for creating more
> portable pg_dump CREATE statements. If someone wants to fix that, they
> have to get it working and get agreement to put it in during beta.
>
> It is on the TODO list (the missing schemas part).

But the regression test fails: (the only failing test against cvs HEAD)
This is not only a pg_dump/pg_restore issue, or?

-- Will fail with bad path
CREATE TABLESPACE badspace LOCATION '/no/such/location';
ERROR: could not set permissions on directory "/no/such/location": No
such file or directory
-- No such tablespace
CREATE TABLE bar (i int) TABLESPACE nosuchspace;
ERROR: tablespace "nosuchspace" does not exist
-- Fail, not empty
DROP TABLESPACE testspace;
ERROR: tablespace "testspace" is not empty
DROP SCHEMA testschema CASCADE;
NOTICE: drop cascades to table testschema.foo
-- Should succeed
DROP TABLESPACE testspace;

=>

***************
*** 38,45 ****
ERROR: tablespace "nosuchspace" does not exist
-- Fail, not empty
DROP TABLESPACE testspace;
! ERROR: tablespace "testspace" is not empty
DROP SCHEMA testschema CASCADE;
! NOTICE: drop cascades to table testschema.foo
-- Should succeed
DROP TABLESPACE testspace;
--- 41,49 ----
ERROR: tablespace "nosuchspace" does not exist
-- Fail, not empty
DROP TABLESPACE testspace;
! ERROR: tablespace "testspace" does not exist
DROP SCHEMA testschema CASCADE;
! ERROR: schema "testschema" does not exist
-- Should succeed
DROP TABLESPACE testspace;
+ ERROR: tablespace "testspace" does not exist

======================================================================
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/

In response to

Responses

Browse pgsql-cygwin by date

  From Date Subject
Next Message Gavin Sherry 2004-10-04 12:20:53 Re: open item: tablespace handing in pg_dump/pg_restore
Previous Message Michael Rogers 2004-10-03 16:22:56 initdb failed

Browse pgsql-hackers by date

  From Date Subject
Next Message Gavin Sherry 2004-10-04 12:20:53 Re: open item: tablespace handing in pg_dump/pg_restore
Previous Message Magnus Hagander 2004-10-04 10:17:13 Re: Libpq problem on Windows.

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Harald Armin Massa 2004-10-04 11:33:38 Re: output file name - was pg_restore / psql
Previous Message Dave Page 2004-10-04 08:34:26 Re: Win32 libpq : Static Link ?