Skip site navigation (1) Skip section navigation (2)

Problems doing a restore under 7.4.2

From: "Chris White (cjwhite)" <cjwhite(at)cisco(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Problems doing a restore under 7.4.2
Date: 2004-04-20 23:25:01
Message-ID: 004b01c4272e$b4141390$5cad6b80@amer.cisco.com (view raw or flat)
Thread:
Lists: pgsql-admin
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


Responses

pgsql-admin by date

Next:From: Greg Sabino MullaneDate: 2004-04-21 01:10:48
Subject: Re: self defined counter function
Previous:From: AlmawElias FantahunDate: 2004-04-20 20:06:16
Subject: unsubscribe

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group