Search Postgresql Archives

can't duplicate an error in a restored DB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Postgres 8.1.11

I'm getting an error when trying to drop a primary key from a table
because of foreign key constraints.  This is OK, not worried about
that.  I am worried that I can't duplicate the problem in a DB created
from a backup of my primary DB.

The error happens in my primary production database.  However, I can't
duplicate the problem on a DB that has been restored from a dump of
the production DB.  I even took my production WAL DB out of standby,
backed it up, recreated the error, restored from the backup I just
made and can no longer recreate the error.

My question: Am I doing something wrong in how I backup and restore a
DB?  Or is there something else going on here?

How I'm dumping/restoring the db below.  There is just the default
postgres DB and my DB named hdap.

linux: pg_dumpall -p 6543 > backup.file
psql: drop database hdap
linux: psql -f backup.file

Below is the ERROR that I can't duplicate in restored DB.

Production
db2/[local] hdap=# ALTER TABLE device.device_types DROP CONSTRAINT
"device_types_pkey" CASCADE;
ALTER TABLE device.device_types DROP CONSTRAINT "device_types_pkey" CASCADE;
NOTICE:  drop cascades to constraint
device_kit_type_members_device_type_id_fkey on table
device.device_kit_type_members
ERROR:  "device_kit_type_members_pkey" is an index

DB created Production pg_dumpall
db6/[local] hdap=# ALTER TABLE device.device_types DROP CONSTRAINT
"device_types_pkey" CASCADE;
ALTER TABLE device.device_types DROP CONSTRAINT "device_types_pkey" CASCADE;
NOTICE:  drop cascades to constraint devices_device_type_id_fkey on
table device.devices
NOTICE:  drop cascades to constraint
device_type_properties_device_type_id_fkey on table
device.device_type_properties
NOTICE:  drop cascades to constraint
device_kit_type_members_device_type_id_fkey on table
device.device_kit_type_members
ALTER TABLE

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux