From: Phillip Smith <phillip.smith@weatherbeeta.com.au>
To: 'Joshua D. Drake' <jd@commandprompt.com>
Cc: 'Tom Lane' <tgl@sss.pgh.pa.us>
Cc: pgsql-admin@postgresql.org
Subject: Re: Restoring pg_dump Backup with psql Fails
Date: Mon, 31 Dec 2007 12:40:12 +1100
Message-ID: <007401c84b4e$15be6270$9b0014ac@wbaus090> (raw)
In-Reply-To: <4775D2F2.4080502@commandprompt.com>
> You have several problems in this dump. One it appears that some of the
> releations already exist. Did you by chance accidently create stuff
> within template1 at some point?
I think I've found my problem:
[postgres@stirling backups]$ psql template1
Welcome to psql 8.2.4, the PostgreSQL interactive terminal.
template1=# \d
List of relations
Schema | Name | Type | Owner
--------+--------------+-------+----------
public | buyers | table | postgres
public | creditors | table | postgres
public | debtors | table | postgres
public | grps | table | postgres
public | po | table | postgres
public | sales_orders | table | postgres
public | stkmvt | table | postgres
public | stock | table | postgres
public | sys | table | postgres
(9 rows)
template1=#
I don't know how or when those tables were created in template1 - they're
certainly not supposed to be there or needed. Is it safe to just DROP the
tables from template1?
> Secondly you need to look into iconv to fix your invalid UTF8 data.
My bad - the old database was using SQL_ASCII encoding, but when I recreated
it I let it default to UTF8.
Re-created it again with SQL_ASCII encoding, which didn't copy the tables
from template1 and now the restore seems to be going OK :)
THINK BEFORE YOU PRINT - Save paper if you don't really need to print this
*******************Confidentiality and Privilege Notice*******************
The material contained in this message is privileged and confidential to
the addressee. If you are not the addressee indicated in this message or
responsible for delivery of the message to such person, you may not copy
or deliver this message to anyone, and you should destroy it and kindly
notify the sender by reply email.
Information in this message that does not relate to the official business
of Weatherbeeta must be treated as neither given nor endorsed by Weatherbeeta.
Weatherbeeta, its employees, contractors or associates shall not be liable
for direct, indirect or consequential loss arising from transmission of this
message or any attachments
e-mail.
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: phillip.smith@weatherbeeta.com.au, jd@commandprompt.com, tgl@sss.pgh.pa.us
Subject: Re: Restoring pg_dump Backup with psql Fails
In-Reply-To: <007401c84b4e$15be6270$9b0014ac@wbaus090>
* 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