From: Chris White (cjwhite) <cjwhite@cisco.com>
To: pgsql-admin@postgresql.org
Subject: Problems doing a restore under 7.4.2
Date: Tue, 20 Apr 2004 16:25:01 -0700
Message-ID: <004b01c4272e$b4141390$5cad6b80@amer.cisco.com> (raw)
I have just migrated from 7.2.1 to 7.4.2 and I have the following tables
defined in my database.
/* ============================================================ */
/* Table: vm_config */
/* ============================================================ */
create table vm_config
(
Parameter varchar(32) not null,
Value varchar(256) not null,
primary key (Parameter)
);
/* ============================================================ */
/* Table: vm_dbversion */
/* ============================================================ */
create table vm_dbversion
(
dbversion integer not null,
timestamp date not null,
createtime time not null,
primary key (dbversion)
);
/* ============================================================ */
/* Table: vm_mailbox */
/* ============================================================ */
create table vm_mailbox
(
MailboxId varchar(64) not null,
MailboxType integer not null default 0,
Description varchar(64) ,
MailboxSize integer ,
MessageSize integer ,
Tutorial boolean not null default true,
TotalMessageTime integer ,
MessageExpiryTime integer ,
Enabled boolean not null default true,
GreetingType integer not null default 10,
OrphanedTime bigint not null default 0,
LastAccessed bigint ,
ZeroOutNumber varchar(32) ,
primary key (MailboxId)
);
/* ============================================================ */
/* Table: vm_mbxusers */
/* ============================================================ */
create table vm_mbxusers
(
MailboxId varchar(64) not null,
UserDN varchar(256) not null,
Owner boolean not null default false,
foreign key (MailboxId) references vm_mailbox on delete cascade on
update cascade,
primary key (MailboxId, UserDN, Owner)
);
/* ============================================================ */
/* Table: vm_greeting */
/* ============================================================ */
create table vm_greeting
(
GreetingId varchar(64) not null,
GreetingType integer not null,
MessageLength integer ,
MessageSize integer ,
GreetingOid OID ,
MailboxId varchar(64) not null,
foreign key (MailboxId) references vm_mailbox on delete cascade on
update cascade,
primary key (GreetingId)
);
/* ============================================================ */
/* Table: vm_message */
/* ============================================================ */
create table vm_message
(
MessageId varchar(128) not null,
MessageType integer not null default 1,
UseCount integer not null default 1,
Sender varchar(256) not null,
Urgent boolean not null default false,
Private boolean not null default false,
MessageLength integer ,
MessageSize integer ,
MessageTime bigint ,
AttachedMsgId varchar(128) ,
MessageOid OID ,
UTCTime varchar(32) ,
ExpiryTime bigint not null default 0,
foreign key (AttachedMsgId) references vm_message on delete cascade on
update cascade,
primary key (MessageId)
);
/* ============================================================ */
/* Table: vm_usermsg */
/* ============================================================ */
create table vm_usermsg
(
MailboxId varchar(64) not null,
MessageId varchar(128) not null,
State integer not null default 1,
StoreTime bigint not null,
foreign key (MailboxId) references vm_mailbox on delete cascade on
update cascade,
foreign key (MessageId) references vm_message on delete cascade on
update cascade,
primary key (MailboxId, MessageId)
);
I have done a backup of my 7.4.2 database using pg_dump. When I restore
the database using the -c option I get the following error message and
pg_restore fails
pg_restore: [archiver (db)] could not execute query: ERROR: trigger
"RI_ConstraintTrigger_17371" for table "vm_message" does not exist
I see the following definition in the dump file for the specified
trigger
--
-- TOC entry 49 (OID 17371)
-- Name: RI_ConstraintTrigger_17371; Type: TRIGGER; Schema: public;
Owner: voicemail
--
CREATE CONSTRAINT TRIGGER "<unnamed>"
AFTER UPDATE ON vm_message
FROM vm_usermsg
NOT DEFERRABLE INITIALLY IMMEDIATE
FOR EACH ROW
EXECUTE PROCEDURE "RI_FKey_cascade_upd"('<unnamed>', 'vm_usermsg',
'vm_message', 'UNSPECIFIED', 'messageid', 'messageid');
What could be the problem? I was able to backup and restore under 7.2.1
without a problem.
Chris
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: cjwhite@cisco.com
Subject: Re: Problems doing a restore under 7.4.2
In-Reply-To: <004b01c4272e$b4141390$5cad6b80@amer.cisco.com>
References: <004b01c4272e$b4141390$5cad6b80@amer.cisco.com>
* 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