Solved

pg_dump, problems with restore

Posted on 2010-11-17
2
712 Views
Last Modified: 2012-05-10
Hi Experts,

I just dumped a postgres db with:
pg_dump mydb > mydb.dmp

Open in new window


then dropped it and recreated it:
postgres=#drop database mydb;
postgres=#create database mydb;
postgres=#grant all privileges on database mydb to myuser;

Open in new window


and tried to restore it with:
psql mydb < mydb.dmp

Open in new window


... and got lots of errors looking like this:
ERROR:  value too long for type character varying(80)

Open in new window


How can that happen?
0
Comment
Question by:alpha-lemming
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 7

Accepted Solution

by:
Hatrix76 earned 500 total points
ID: 34154731
did you create the database with another encoding? like you created it now with ASCII and the dump was in UTF-8? that could be a problem (multibyte versus string).

it would be good if you can provide more information on the current created database and if possible the data which fails to be inserted.

0
 

Author Closing Comment

by:alpha-lemming
ID: 34204601
That was it, exactly!
0

Featured Post

Get Database Help Now w/ Support & Database Audit

Keeping your database environment tuned, optimized and high-performance is key to achieving business goals. If your database goes down, so does your business. Percona experts have a long history of helping enterprises ensure their databases are running smoothly.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
script for Galera cluster 4 323
How do you migrate a "Live" database to the Cloud? 12 392
Need help with query for Pervasive 2 131
vcenter 6 u2 install question 1 131
Best database to use for Maps is PostgreSQL. This is an open source database. Comes as a package with most Linux OS. For more info visit the following site: http://www.postgresql.org/ (http://www.postgresql.org/) This requires some add-o…
Many developers have database experience, but are new to PostgreSQL. It has some truly inspiring capabilities. I have several years' experience with Microsoft's SQL Server. When I began working with MySQL, I wanted a quick-reference to MySQL (htt…
Steps to create a PostgreSQL RDS instance in the Amazon cloud. We will cover some of the default settings and show how to connect to the instance once it is up and running.

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question