X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id D138111F90FE for ; Mon, 24 Apr 2006 07:50:01 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 25779-06 for ; Mon, 24 Apr 2006 07:33:09 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.logix-tt.com (unknown [212.211.145.186]) by postgresql.org (Postfix) with ESMTP id 9105D11F8FFD for ; Mon, 24 Apr 2006 07:33:08 -0300 (ADT) Received: from kingfisher.intern.logix-tt.com (Ta21a.t.pppool.de [89.55.162.26]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.logix-tt.com (Postfix) with ESMTP id 64005656CD; Mon, 24 Apr 2006 12:34:11 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by kingfisher.intern.logix-tt.com (Postfix) with ESMTP id 0061B18148C83; Mon, 24 Apr 2006 12:33:21 +0200 (CEST) Message-ID: <444CA971.3000505@logix-tt.com> Date: Mon, 24 Apr 2006 12:33:21 +0200 From: Markus Schaber Organization: Logical Tracking and Tracing International AG, Switzerland User-Agent: Debian Thunderbird 1.0.7 (X11/20051017) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Markus Schaber Cc: PostgreSQL SQL List Subject: Re: Migrating a Database to a new tablespace References: <4444D607.1000309@logix-tt.com> <444CA2F5.4030705@logix-tt.com> In-Reply-To: <444CA2F5.4030705@logix-tt.com> X-Enigmail-Version: 0.93.0.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200604/157 X-Sequence-Number: 24966 Hello, Markus Schaber wrote: >>What is the easiest way to migrate a complete database from one >>tablespace to another? >> >>ALTER DATABASE only allows to set the default tablespace, but not >>migrating the existing database. > > Is there really no way to do this? Via some scripting, I now migrated all tables and indices, however I found no way to migrate sequences. The problem is that I cannot just move the tablespace itsself via mv/symlink/fiddling_of_systables, because the tablespace contains some other databases that are meant to remain there. Thanks, Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org