Skip site navigation (1) Skip section navigation (2)

Restoring to a different tablespace

From: "Joeseph Blowseph" <joseph_blowseph(at)hotmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Restoring to a different tablespace
Date: 2005-12-26 13:05:25
Message-ID: BAY101-F1082F07161383B925EA8CF83340@phx.gbl (view raw or flat)
Thread:
Lists: pgsql-novice
I ran a default windows installation and consequently the public schema uses 
my c: drive. There's not much space on there and I need to restore a fairly 
large backup that was taken on a different machine.

I've created a tablespace with a datafile on my f: drive and configured a 
user to have that tablespace as its default. The user is the same name as 
the user which owned the tables on the original database. If I log on as 
that user and create a table, the table is created in the new tablespace as 
expected.

However, if I run a restore, connecting as the new user,  the tables are 
owned by the user as expected, but they are going to the default tablespace 
and blowing my C: filesystem.  Can anyone advise how to import the tables 
into the new tablespace? I've tried various combinations of parameters for 
the restore, including the -o option but so far haven't managed to crack it.

Thanks,
JB.

_________________________________________________________________
Be the first to hear what's new at MSN - sign up to our free newsletters! 
http://www.msn.co.uk/newsletters


Responses

pgsql-novice by date

Next:From: Rana BiswasDate: 2005-12-26 13:55:47
Subject: Postgresql 8.1
Previous:From: David ChapmanDate: 2005-12-25 22:06:43
Subject: PG_Dump Users and Groups

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group