From: | "Birchall, Austen" <austen(dot)birchall(at)metoffice(dot)gov(dot)uk> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: pg_restore hangs for en_US.utf8 in the UK |
Date: | 2015-07-16 09:59:20 |
Message-ID: | 4E154FB60786D74BB4DFDC97BF991CAC0708F9D3@EXXCMPD1DAG2.cmpd1.metoffice.gov.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
(As usual) I didn't explain myself very clearly so taking a step back I tried a different approach:
1. Step1
postgres=# update pg_database set encoding = 6, datcollate = 'en_US.UTF8', datctype = 'en_US.UTF8' where datname = 'template0';
2. Following
http://www.postgresql.org/docs/9.4/static/app-pgrestore.html
$createdb -T template0 ***db
which gives
postgres=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+----------+----------+------------+------------+-----------------------
***db | postgres | UTF8 | en_US.utf8 | en_US.utf8 |
postgres | postgres | LATIN1 | en_GB | en_GB |
template0 | postgres | UTF8 | en_US.UTF8 | en_US.UTF8 | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | LATIN1 | en_GB | en_GB | postgres=CTc/postgres+
| | | | | =c/postgres
test | postgres | LATIN1 | en_GB | en_GB |
(6 rows)
3.
$pg_restore -d ***db_database_dump201507131900
And the tables and data now seem to be back! I must have got confused before as tom lane suggested
Thanks for your help
Austen
-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: 16 July 2015 01:36
To: Birchall, Austen
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: [NOVICE] pg_restore hangs for en_US.utf8 in the UK
"Birchall, Austen" <austen(dot)birchall(at)metoffice(dot)gov(dot)uk> writes:
> Trying to restore the data after restoring the tables etc. from a
> pg_dumpall out.sql type file using pg_restore -d
> ***db_database_dump201507131900 -v just hangs
pg_dumpall produces a SQL script; you should feed that to psql not pg_restore.
I'm not sure though why you're seeing it hang; all the versions I have handy produce some kind of error message when fed a script file.
Hmm ... is that the *whole* command line? If so problem is that it's patiently waiting for some input on stdin.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Emmanuel Quevillon | 2015-07-17 08:32:50 | Temporary table and dump |
Previous Message | Tom Lane | 2015-07-16 00:35:49 | Re: pg_restore hangs for en_US.utf8 in the UK |