X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id B4B32D1BAAD for ; Fri, 9 Apr 2004 04:26:14 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 84689-09 for ; Fri, 9 Apr 2004 04:26:12 -0300 (ADT) Received: from sj-iport-5.cisco.com (sj-iport-5.cisco.com [171.68.10.87]) by svr1.postgresql.org (Postfix) with ESMTP id 850F6D1B9EB for ; Fri, 9 Apr 2004 04:26:11 -0300 (ADT) Received: from sj-core-3.cisco.com (171.68.223.137) by sj-iport-5.cisco.com with ESMTP; 09 Apr 2004 00:27:17 -0700 Received: from cjwhitew2k02 (sjc-vpn1-375.cisco.com [10.21.97.119]) by sj-core-3.cisco.com (8.12.10/8.12.6) with ESMTP id i397QABB009476 for ; Fri, 9 Apr 2004 00:26:11 -0700 (PDT) Reply-To: From: "Chris White (cjwhite)" To: Subject: Trouble restoring 7.2.1 database into 7.4.2 database Date: Fri, 9 Apr 2004 00:26:11 -0700 Message-ID: <004601c41e03$eeef4590$77976b80@amer.cisco.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0047_01C41DC9.42906D90" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200404/177 X-Sequence-Number: 13150 This is a multi-part message in MIME format. ------=_NextPart_000_0047_01C41DC9.42906D90 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I have table defined as follows: create table vm_emailjob ( JobId serial not null, MessageId varchar(128) not null, Recipients bytea not null, SendTime bigint not null, QueuedTime bigint not null, RetryCount integer not null, primary key (JobId) ); When I restore a backup into a 7.4.2 database from a backup made on 7.2.1 database, using the clean option, I get the following error. pg_restore: [archiver (db)] could not execute query: ERROR: sequence "vm_emailjob_jobid_seq" does not exist and the restore fails. If I edit the pg_backup_db.c to display what's statements are being executed I see the following: sending: 'DROP TABLE "vm_emailjob";' sending: 'DROP SEQUENCE "vm_emailjob_jobid_seq";' pg_restore: [archiver (db)] could not execute query: ERROR: sequence "vm_emailjob_jobid_seq" does not exist Looks like the Drop table is also deleting the sequence. If I do the restore on a 7.2.1 database I have no problem. How can I get around this? Chris White ------=_NextPart_000_0047_01C41DC9.42906D90 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Message
I have ta= ble defined=20 as follows:
 
create ta= ble=20 vm_emailjob
(
   =20 JobId           &nbs= p;       =20 serial           &nb= sp;   =20 not null,
   =20 MessageId           =     =20 varchar(128)          not=20 null,
   =20 Recipients           = ;   =20 bytea           &nbs= p;    =20 not null,
   =20 SendTime           &= nbsp;    =20 bigint           &nb= sp;   =20 not null,
   =20 QueuedTime           = ;   =20 bigint           &nb= sp;   =20 not null,
   =20 RetryCount           = ;   =20 integer           &n= bsp;  =20 not null,
 
 &nb= sp; =20 primary key (JobId)
);
When I re= store a=20 backup into a 7.4.2 database from a backup made on 7.2.1 database, using th= e=20 clean option, I get the following error.
 
pg_restor= e:=20 [archiver (db)] could not execute query: ERROR:  sequence=20 "vm_emailjob_jobid_seq" does not exist
 
and the r= estore=20 fails. If I edit the pg_backup_db.c to display what's statements are being= =20 executed I see the following:
 
 &nb= sp; =20 sending: 'DROP TABLE "vm_emailjob";'
 
 &nb= sp; =20 sending: 'DROP SEQUENCE "vm_emailjob_jobid_seq";'
 
pg_restor= e:=20 [archiver (db)] could not execute query: ERROR:  sequence=20 "vm_emailjob_jobid_seq" does not exist
Looks lik= e the Drop=20 table is also deleting the sequence.
 
If I do t= he restore=20 on a 7.2.1 database I have no problem.
 
How can I= get around=20 this?
 
Chris=20 White
------=_NextPart_000_0047_01C41DC9.42906D90--