X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id BE788D1D2CC; Thu, 22 Apr 2004 12:33:04 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 98096-05; Thu, 22 Apr 2004 12:33:03 -0300 (ADT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id AE7C5D1D25B; Thu, 22 Apr 2004 12:33:02 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i3MFWwQQ007244; Thu, 22 Apr 2004 11:32:58 -0400 (EDT) To: Fischer Ulrich Cc: a.schmitz@cityweb.de, pgsql-admin@postgresql.org, pgsql-general@postgresql.org Subject: Re: [GENERAL] Restoring a Databases that features tserach2 In-reply-to: <4087D682.6020803@aerodynamics.ch> References: <4087886A.9080709@aerodynamics.ch> <200404221208.07902.a.schmitz@cityweb.de> <4087A5BB.8010000@aerodynamics.ch> <25783.1082641667@sss.pgh.pa.us> <4087D682.6020803@aerodynamics.ch> Comments: In-reply-to Fischer Ulrich message dated "Thu, 22 Apr 2004 16:28:18 +0200" Date: Thu, 22 Apr 2004 11:32:57 -0400 Message-ID: <7243.1082647977@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200404/297 X-Sequence-Number: 13270 Fischer Ulrich writes: > Tom Lane wrote: >> This is certainly not going to work because the dump from the old >> database will already have all the tsearch2 objects, not to mention >> whatever setup_ge_ispell.sql may create. You should get rid of steps >> 3 and 3a. > Get rid of Step 3 and 3a produces Errors in Step 4 like: > ERROR: type "tsvector" does not exist Yeah, not surprising if you used ALTER TABLE to add a tsvector column to a table created before you'd loaded tsearch2 into the database. The dump will create the objects in the wrong order. This whole class of problems should be gone in 7.5, since CVS-tip pg_dump understands dependencies properly. As a short-term workaround I'd suggest using "pg_dump -Fc db" as the source data and manually adjusting the load order with pg_restore's -L option. The separate-schema-and-data approach is not very good since it's a lot slower to load large databases that way. regards, tom lane