Received: from xyzzy.lan.internal (d226-80-178.home.cgocable.net [24.226.80.178]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fBI674m23846 for ; Tue, 18 Dec 2001 01:07:04 -0500 (EST) (envelope-from drew@xyzzy.dhs.org) Received: from localhost ([127.0.0.1] ident=drew) by xyzzy.lan.internal with esmtp (Exim 3.33 #1 (Debian)) id 16GDP2-0001Ou-00; Tue, 18 Dec 2001 01:07:00 -0500 Subject: Re: Resetting connection errors and incomplete restores. From: "Andrew G. Hammond" To: Sanjay Bhatia Cc: pgsql-admin@postgresql.org In-Reply-To: <20011218001557.96922.qmail@web13005.mail.yahoo.com> References: <20011218001557.96922.qmail@web13005.mail.yahoo.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-KdJkzue7rYQ7LGYOjQ1C" X-Mailer: Evolution/1.0 (Preview Release) Date: 18 Dec 2001 01:06:59 -0500 Message-Id: <1008655620.4652.4.camel@xyzzy> Mime-Version: 1.0 X-Archive-Number: 200112/112 X-Sequence-Number: 2835 --=-KdJkzue7rYQ7LGYOjQ1C Content-Type: text/plain Content-Transfer-Encoding: quoted-printable My suggestion would be to grep out all the userid changes that are going on here. You don't need them and they clutter up your output. Also, in the future use the -f db.out option with psql, you'll get line numbers on the errors which should help you diagnose the problem. On Mon, 2001-12-17 at 19:15, Sanjay Bhatia wrote: > Hello. >=20 > I am running into a problem while restoring a database and would really > appreciate your help to figure out what's going on. >=20 > I created a dump file using=20 >=20 > pg_dump -a mydb > $WORKING_DIR/db.out >=20 > I then copy the db.out file to a new machine and recreate/reinitialize the > 'mydb' database. This process creates the database, a user and a group f= or me. > I use the following command to restore the database -=20 >=20 > psql -d mydb -U sb < db.out >=20 > The sb user is created during the initialization process. >=20 > We have a few tables in the database with thousands of rows. My problem = is > that 2 of the tables don't get restored completely... When the restore co= mmand > completes, No new rows get added to these 2 (app_user and app_group) tabl= es.=20 > I've included the output of the restore command below. Can you please le= t me > know how to fix this? >=20 > I've also included the contents of the logfile below. >=20 > Thanks, > sb >=20 > You are now connected as new user sb. > UPDATE 1 > You are now connected as new user roxadmin. > You are now connected as new user sb. > UPDATE 1 > UPDATE 1 > You are now connected as new user roxadmin. > ERROR: copy: line 1, Cannot insert a duplicate key into unique index > rox_permission_pkey > PQendcopy: resetting connection > You are now connected as new user sb. > UPDATE 1 > UPDATE 1 > You are now connected as new user roxadmin. > ERROR: copy: line 1, Cannot insert a duplicate key into unique index > rox_user_pkey > PQendcopy: resetting connection > You are now connected as new user sb. > UPDATE 1 > UPDATE 1 > You are now connected as new user roxadmin. > ERROR: copy: line 1, Cannot insert a duplicate key into unique index > rox_group_pkey > PQendcopy: resetting connection > You are now connected as new user sb. > UPDATE 1 > UPDATE 1 > You are now connected as new user roxadmin. > ERROR: copy: line 1, Cannot insert a duplicate key into unique index > rox_group_member_pkey > PQendcopy: resetting connection > You are now connected as new user sb. > UPDATE 1 > UPDATE 1 > You are now connected as new user roxadmin. > ERROR: copy: line 1, Cannot insert a duplicate key into unique index > rox_parent_child_group_pkey > PQendcopy: resetting connection > You are now connected as new user sb. > UPDATE 1 > UPDATE 1 > You are now connected as new user roxadmin. > ERROR: copy: line 1, Cannot insert a duplicate key into unique index > rox_group_graph_pkey > PQendcopy: resetting connection > You are now connected as new user sb. > UPDATE 1 > UPDATE 1 > You are now connected as new user roxadmin. > ERROR: copy: line 1, Cannot insert a duplicate key into unique index > rox_granted_permission_pkey > PQendcopy: resetting connection > You are now connected as new user sb. > UPDATE 1 > UPDATE 1 > You are now connected as new user roxadmin. > You are now connected as new user sb. > UPDATE 1 > UPDATE 1 > You are now connected as new user roxadmin. > You are now connected as new user sb. > UPDATE 1 > UPDATE 1 > You are now connected as new user roxadmin. > You are now connected as new user sb. > UPDATE 1 > UPDATE 1 > You are now connected as new user roxadmin. > You are now connected as new user sb. > UPDATE 1 > UPDATE 1 > You are now connected as new user roxadmin. > You are now connected as new user sb. > UPDATE 1 > UPDATE 1 > You are now connected as new user roxadmin. > You are now connected as new user sb. > UPDATE 1 > UPDATE 1 > You are now connected as new user roxadmin. > You are now connected as new user sb. > UPDATE 1 > UPDATE 1 > You are now connected as new user roxadmin. > You are now connected as new user sb. > UPDATE 1 > UPDATE 1 > You are now connected as new user roxadmin. > You are now connected as new user sb. > UPDATE 1 > UPDATE 1 > You are now connected as new user roxadmin. > You are now connected as new user sb. > UPDATE 1 > UPDATE 1 > You are now connected as new user roxadmin. > You are now connected as new user sb. > UPDATE 1 > UPDATE 1 > You are now connected as new user roxadmin. > You are now connected as new user sb. > UPDATE 1 > UPDATE 1 > You are now connected as new user roxadmin. > You are now connected as new user sb. > UPDATE 1 > UPDATE 1 > You are now connected as new user roxadmin. > You are now connected as new user sb. > UPDATE 1 > UPDATE 1 > You are now connected as new user roxadmin. > You are now connected as new user sb. > UPDATE 1 >=20 >=20 >=20 >=20 > LOG FILE CONTENTS :=20 > DEBUG: database system was shut down at 2001-12-17 16:06:21 PST > DEBUG: CheckPoint record at (0, 2207456) > DEBUG: Redo record at (0, 2207456); Undo record at (0, 0); Shutdown TRUE > DEBUG: NextTransactionId: 693; NextOid: 19675 > DEBUG: database system is in production state > ERROR: copy: line 1, Cannot insert a duplicate key into unique index > rox_permission_pkey > FATAL 1: Socket command type 0 unknown > ERROR: copy: line 1, Cannot insert a duplicate key into unique index > rox_user_pkey > pq_flush: send() failed: Broken pipe > FATAL 1: Socket command type 1 unknown > pq_flush: send() failed: Broken pipe > ERROR: copy: line 1, Cannot insert a duplicate key into unique index > rox_group_pkey > pq_flush: send() failed: Broken pipe > FATAL 1: Socket command type 0 unknown > pq_flush: send() failed: Broken pipe > ERROR: copy: line 1, Cannot insert a duplicate key into unique index > rox_group_member_pkey > pq_flush: send() failed: Broken pipe > FATAL 1: Socket command type \ unknown > pq_flush: send() failed: Broken pipe > ERROR: copy: line 1, Cannot insert a duplicate key into unique index > rox_parent_child_group_pkey > pq_flush: send() failed: Broken pipe > FATAL 1: Socket command type \ unknown > pq_flush: send() failed: Broken pipe > ERROR: copy: line 1, Cannot insert a duplicate key into unique index > rox_group_graph_pkey > FATAL 1: Socket command type \ unknown > ERROR: copy: line 1, Cannot insert a duplicate key into unique index > rox_granted_permission_pkey > pq_flush: send() failed: Broken pipe > FATAL 1: Socket command type \ unknown > pq_flush: send() failed: Broken pipe > DEBUG: copy: line 584, XLogWrite: new log file created - consider increa= sing > WAL_FILES >=20 >=20 >=20 > __________________________________________________ > Do You Yahoo!? > Check out Yahoo! Shopping and Yahoo! Auctions for all of > your unique holiday gifts! Buy at http://shopping.yahoo.com > or bid at http://auctions.yahoo.com >=20 > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? >=20 > http://archives.postgresql.org >=20 --=20 Andrew G. Hammond mailto:drew@xyzzy.dhs.org=20=20 http://xyzzy.dhs.org/~drew/ 56 2A 54 EF 19 C0 3B 43 72 69 5B E3 69 5B A1 1F=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20 613-389-5481 5CD3 62B0 254B DEB1 86E0 8959 093E F70A B457 84B1 "To blow recursion you must first blow recur" -- me --=-KdJkzue7rYQ7LGYOjQ1C Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iQCVAwUAPB7dA8aBTSA3ULb1AQJcFQQAvkP+zr9wP03pA2E8eeu5OwsBnn0WxmuM J1X5mGGE+0iLz0Y+zATlwaeDoq9N9jMfrY32BM/MVS2aALIx5KTITg0nGK1goh/z P6/vADN7d7cR+4wbQ2sM2ihspDExzKbFDbl8RuucLxjmxfUPVWSS7SHpcN/qShy8 32MpSGAcQPE= =P/W9 -----END PGP SIGNATURE----- --=-KdJkzue7rYQ7LGYOjQ1C--