X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 5F3059FB248 for ; Fri, 4 Aug 2006 16:36:33 -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 30714-10 for ; Fri, 4 Aug 2006 16:36:28 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail17.bluewin.ch (mail17.bluewin.ch [195.186.18.64]) by postgresql.org (Postfix) with ESMTP id 06AA99FB1D2 for ; Fri, 4 Aug 2006 16:36:28 -0300 (ADT) Received: from [192.168.1.74] (83.79.155.91) by mail17.bluewin.ch (Bluewin 7.3.110.2) id 44B3612F0051F5D1 for pgsql-admin@postgresql.org; Fri, 4 Aug 2006 19:36:27 +0000 From: Ivo Rossacher To: pgsql-admin@postgresql.org Subject: Re: Restoring dtabase problem Date: Fri, 4 Aug 2006 21:36:11 +0200 User-Agent: KMail/1.8.2 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200608042136.11676.rossacher@bluewin.ch> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200608/47 X-Sequence-Number: 22591 Am Freitag, 4. August 2006 19.06 schrieb Benjamin Krajmalnik: > I am trying to restore a database from a pg_dump. > I have a problematic issue in that a few rows have a problem with UTF-8 > encoding. > All of these rows are in a specific table. > Is there something I can run against the table which will validate the > rows which have the bad data and delete the rows? Typically this issue is related to a low number of invalid characters comming up a lot of time in the file. So I would replace the invalid codes with the correct unicode character by a text editor (take care to choose the correct encoding in the editor). In the context of the rest of the text it becomes mostly clear what the correct unicode character should be. > > The database is quite large (8GB) and I was informed that it would be > much faster to restore using the COPY method as opposed to the INSERT > method. This is correct, but has to be done when dumping (see man pg_dump -> options -d -D). 8GB, well this will take quite some time with inserts ... Regards Ivo > Any and all assistance will be deeply appreciated. > > > Regards, > > Benjamin