Truncation on restore - Mailing list pgsql-novice

From Andrew Kelly
Subject Truncation on restore
Date
Msg-id 3FD48172.18E93DB0@transparency.org
Whole thread Raw
Responses Re: Truncation on restore
List pgsql-novice
Hi everybody,

forgive me if this is covered in an FAQ or something, I just
haven't been able to find it. This question might not even
belong on this list and I apologize if that's the case.


I was recently handed a CD containing a CVS checkout of more
than 26 thousand files and the dump of a production DB, and
told to duplicate the development environment.
I'm always up for a challenge, so of course I didn't hurt
anybody.

I seem already to be failing at trying to use the dump to
create the database, though, and I'm wondering where I should
start looking.

If I do a simple grep of the dump file, I count 265 table
creation statements. However, after restoring
(psql test -f dump.sql) there are only 240 tables in the
test database, and there were truncations and errors due
to them sent to the console during the restore.

It seems that many of the index names are being truncated
31 characters and this cascades to other errors.

I guess that my question in its most basic form is,
"What have I done wrong?".  A quick google didn't turn
up much other than apparently truncation at 31 chars is
common and generally never causes a problem. And yet,
my stuff takes a nose dive.

Any help out there?

The system where the dump was generated and the system
where it's trying to be restored are both RH 7.3 boxes,
driving 7.2.1 versions of PostgreSQL.

Thanks everybody.

Andy

pgsql-novice by date:

Previous
From: Marcin Gil
Date:
Subject: duplicate entries on primary key
Next
From: "C G"
Date:
Subject: Users and session ids