Unix Technical Forum

Restoring dtabase problem

This is a discussion on Restoring dtabase problem within the pgsql Admins forums, part of the PostgreSQL category; --> I am trying to restore a database from a pg_dump. I have a problematic issue in that a few ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Admins

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 07:28 AM
Benjamin Krajmalnik
 
Posts: n/a
Default Restoring dtabase problem

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?

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.
Any and all assistance will be deeply appreciated.


Regards,

Benjamin

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 07:28 AM
Ivo Rossacher
 
Posts: n/a
Default Re: Restoring dtabase problem

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


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:41 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com