Re: restore crashes PG on Linux, works on Windows

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "chris(at)chriscurvey(dot)com" <chris(at)chriscurvey(dot)com>, pgsql <pgsql-general(at)postgresql(dot)org>
Subject: Re: restore crashes PG on Linux, works on Windows
Date: 2013-11-26 14:46:05
Message-ID: A737B7A37273E048B164557ADEF4A58B17C603F5@ntex2010i.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Chris Curvey wrote:
> My vendor took a dump of our "something else" database (which runs on Windows), did their conversion
> to Postgres, and then sent me back a postgres dump (custom format) of the database for me to load onto
> my servers for testing.
>
>
> I was interested to find that while I can load the dump onto a PG 9.3 server running on Windows, I'm
> unable to load it on either 9.2 or 9.3 running on Linux. At some point during the restore process
> (and it's not a consistent point), PG on Linux crashes.

You mean, the database server dies?
Or that there is an error message?
If it is the latter, can we see the error message?

> I suspect that the problem is related to the encoding specified in the database dump:
>
> CREATE DATABASE "TestDatabase" WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE =
> 'English_United States.1252' LC_CTYPE = 'English_United States.1252';

Yes, that should throw an error on a Linux system.
But you should get that error consistently, different from
what you write above.

> So my questions for the brain trust are:
>
>
> 1) Would you expect this to work?

No, as stated above.

> 2) If I had to load this database on Linux, what would be the best way to go about it? (see if I can
> find that charset/encoding for Linux? Ask the vendor for a plain-text dump? )

You can create the database beforehand and ignore the one error
from pg_restore.

You can convert the custom format dump into an SQL file with
pg_restore -f dumpfile.sql dumpfile.dmp

Yours,
Laurenz Albe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2013-11-26 14:48:34 Re: restore crashes PG on Linux, works on Windows
Previous Message Andrew Sullivan 2013-11-26 14:36:20 Re: restore crashes PG on Linux, works on Windows