Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 0242C632AAD for ; Tue, 24 Aug 2010 18:24:49 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 21812-06 for ; Tue, 24 Aug 2010 21:24:40 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.egcrc.net (mail.egcrc.net [63.193.204.10]) by mail.postgresql.org (Postfix) with ESMTP id 4132963244B for ; Tue, 24 Aug 2010 18:24:41 -0300 (ADT) Received: from EGCRC-EX04.egcrc.org ([::1]) by EGCRC-EX03.egcrc.org ([::1]) with mapi; Tue, 24 Aug 2010 14:24:24 -0700 From: Tena Sakai To: Kevin Grittner , "pgsql-admin@postgresql.org" CC: "ian.lea@gmail.com" Date: Tue, 24 Aug 2010 14:22:32 -0700 Subject: Re: trouble restoring database Thread-Topic: [ADMIN] trouble restoring database Thread-Index: ActDwErZ0DR3aZ0HROWwFASyEPOt8QAEiue2 Message-ID: In-Reply-To: <4C73D33F0200002500034AF1@gw.wicourts.gov> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-Entourage/13.4.0.100208 acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201008/195 X-Sequence-Number: 35444 Hi Kevin, My apology for insufficient post. Here's what I did and its response: testdb=3D# select * from pg_stat_database; datid | datname | numbackends | xact_commit | xact_rollback | blks_read = | blks_hit | tup_returned | tup_fetched | tup_inserted | tup_updated | tup_deleted=20 -------+-----------+-------------+-------------+---------------+-----------= + ----------+--------------+-------------+--------------+-------------+------= - ------ 1 | template1 | 0 | 0 | 0 | 0 = | 0 | 0 | 0 | 0 | 0 | 0 11563 | template0 | 0 | 0 | 0 | 0 = | 0 | 0 | 0 | 0 | 0 | 0 11564 | postgres | 0 | 2568 | 89 | 475 = | 76273 | 618461 | 24179 | 4374 | 295 | 1 16384 | testdb | 1 | 310 | 0 | 105 = | 5808 | 85597 | 1080 | 0 | 0 | 0 (4 rows) Under datname column, I expected to see a name "canon". Having said that, I think Ian is correct that I was missing -c flag in the command below: gunzip ..../dumpall20100822.0.gz | /usr/local/pgsql/bin/psql -f - postgre= s This command, I think, uncompressed the file, but didn't feed the output into the pipe and psql just waited and then received nothing and terminated= . Since the file got uncompressed, I am now running the command: psql -f /home/tsakai/Notes/postgres/dumpall20100822.0 and I think it is working. It is giving messsages: ERROR: role "postgres" already exists STATEMENT: CREATE ROLE postgres; ERROR: database "testdb" already exists STATEMENT: CREATE DATABASE testdb WITH TEMPLATE =3D template0 OWNER =3D postgres ENCODING =3D 'UTF8'; LOG: checkpoints are occurring too frequently (5 seconds apart) HINT: Consider increasing the configuration parameter "checkpoint_segments". The last 2 lines are repeated many, many times. This is not terribly Serious, is it? (I will fix it via postgresql.conf file shortly.) Regards, Tena Sakai tsakai@gallo.ucsf.edu On 8/24/10 12:12 PM, "Kevin Grittner" wrote: > Tena Sakai wrote: > =20 >> gunzip ..../dumpall20100822.0.gz >> | /usr/local/pgsql/bin/psql -f * postgres >> Which terminated with exit status 0. >>=20 >> But when I look at pg_stat_database I don*t see the database I >> expected. > =20 > What database did you expect? What do you see? Is there anything > interesting in the log file? > =20 >> Can somebody please tell me why this didn*t work? Also, what must >> I do to successfully restore the database? > =20 > Please read this page and post again with more information: > =20 > http://wiki.postgresql.org/wiki/Guide_to_reporting_problems > =20 > -Kevin