pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Toland <ccitt@thechillhacker.com>
To: pgsql-admin@postgresql.org
Subject: PG export/import encoding issue
Date: Mon, 19 Dec 2011 11:15:49 -0500
Message-ID: <030501ccbe69$79cc56e0$6d6504a0$@thechillhacker.com> (raw)

Hi guys

 

I have a 8.4 install that I am moving to a new DB server running 9.0. This
is all well and god for the most part, except when it comes to restoring the
data in several of the tables. See the problem is the old schema was an
ASCII neutral zone, and the new server has the schema set for UTF-8 for i18n
compliance. Over the years, people have inserted data in a wide range of
languages in many encodings, none of it tracked. This of course leads to the
dreaded encoding errors on import that, ,with normal COPY mechanics, result
in empty tables where there should be thousands of rows.

 

Switching to INSERTS means I get to keep most of the table, and just lose
the rows with encoding errors. Not great, but manageable - the real killer
with this method is that an import takes hours, which we cannot allow.

 

Is there a way to make pg_restore escape out chars it has problems with
instead of failing? Alternatively, what is the best method to quickly and
accurately import this database onto the new server? I have tried sql and
custom pg_dump formats, with (not surprisingly) the custom format being the
heads-and-shoulders winner in terms of performance

 

Thanks a bunch guys

 

Scott Toland

 

view thread (2+ messages)  latest in thread

Message-ID: <030501ccbe69$79cc56e0$6d6504a0$@thechillhacker.com>
Permalink:  ../030501ccbe69$79cc56e0$6d6504a0$@thechillhacker.com/
Also on:    postgresql.org/message-id/030501ccbe69$79cc56e0$6d6504a0$@thechillhacker.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: ccitt@thechillhacker.com
  Subject: Re: PG export/import encoding issue
  In-Reply-To: <030501ccbe69$79cc56e0$6d6504a0$@thechillhacker.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox