This is the mail archive of the
cygwin-apps@cygwin.com
mailing list for the Cygwin project.
Re: Please upload: postgresql-8.0.0cvs-1 [test]
Gerrit P. Haase schrieb:
The tablespace feature is known to fail.
What does this mean exactly? (Link to docu should do it).
http://developer.postgresql.org/docs/postgres/catalog-pg-tablespace.html
just specify the physical layout for a table. taken from oracle.
implemented as simple symlink on directories.
to share a db across discs probably.
added just lately.
This is the expected result:
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;
our culprit:
CREATE TABLESPACE testspace LOCATION
'/usr/src/postgresql/postgresql-8.0.0cvs/src/test/regress/testtablespace';
+ ERROR: could not create symbolic link
"/usr/src/postgresql/postgresql-8.0.0cvs/src/test/regress/./tmp_check/data/pg_tblspc/155183":
Permission denied
-- create a schema in the tablespace
It failed to hardlink a directory (probably bogus error message).
Some win32 magician changed the existing symlink code to use junctions
lately. But I have to check the actual codepath.
Attached are the failing tests.
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/
*** ./expected/tablespace.out Mon Oct 4 21:15:55 2004
--- ./results/tablespace.out Mon Oct 4 21:19:59 2004
***************
*** 1,34 ****
-- create a tablespace we can use
CREATE TABLESPACE testspace LOCATION '/usr/src/postgresql/postgresql-8.0.0cvs/src/test/regress/testtablespace';
-- create a schema in the tablespace
CREATE SCHEMA testschema TABLESPACE testspace;
-- sanity check
SELECT nspname, spcname FROM pg_catalog.pg_tablespace t, pg_catalog.pg_namespace n
where n.nsptablespace = t.oid and n.nspname = 'testschema';
nspname | spcname
! ------------+-----------
! testschema | testspace
! (1 row)
-- try a table
CREATE TABLE testschema.foo (i int);
SELECT relname, spcname FROM pg_catalog.pg_tablespace t, pg_catalog.pg_class c
where c.reltablespace = t.oid AND c.relname = 'foo';
relname | spcname
! ---------+-----------
! foo | testspace
! (1 row)
INSERT INTO testschema.foo VALUES(1);
INSERT INTO testschema.foo VALUES(2);
-- index
CREATE INDEX foo_idx on testschema.foo(i);
SELECT relname, spcname FROM pg_catalog.pg_tablespace t, pg_catalog.pg_class c
where c.reltablespace = t.oid AND c.relname = 'foo_idx';
relname | spcname
! ---------+-----------
! foo_idx | testspace
! (1 row)
-- Will fail with bad path
CREATE TABLESPACE badspace LOCATION '/no/such/location';
--- 1,37 ----
-- create a tablespace we can use
CREATE TABLESPACE testspace LOCATION '/usr/src/postgresql/postgresql-8.0.0cvs/src/test/regress/testtablespace';
+ ERROR: could not create symbolic link "/usr/src/postgresql/postgresql-8.0.0cvs/src/test/regress/./tmp_check/data/pg_tblspc/155183": Permission denied
-- create a schema in the tablespace
CREATE SCHEMA testschema TABLESPACE testspace;
+ ERROR: tablespace "testspace" does not exist
-- sanity check
SELECT nspname, spcname FROM pg_catalog.pg_tablespace t, pg_catalog.pg_namespace n
where n.nsptablespace = t.oid and n.nspname = 'testschema';
nspname | spcname
! ---------+---------
! (0 rows)
-- try a table
CREATE TABLE testschema.foo (i int);
+ ERROR: schema "testschema" does not exist
SELECT relname, spcname FROM pg_catalog.pg_tablespace t, pg_catalog.pg_class c
where c.reltablespace = t.oid AND c.relname = 'foo';
relname | spcname
! ---------+---------
! (0 rows)
INSERT INTO testschema.foo VALUES(1);
+ ERROR: schema "testschema" does not exist
INSERT INTO testschema.foo VALUES(2);
+ ERROR: schema "testschema" does not exist
-- index
CREATE INDEX foo_idx on testschema.foo(i);
+ ERROR: schema "testschema" does not exist
SELECT relname, spcname FROM pg_catalog.pg_tablespace t, pg_catalog.pg_class c
where c.reltablespace = t.oid AND c.relname = 'foo_idx';
relname | spcname
! ---------+---------
! (0 rows)
-- Will fail with bad path
CREATE TABLESPACE badspace LOCATION '/no/such/location';
***************
*** 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
======================================================================