Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id CC70463226D for ; Wed, 25 Aug 2010 01:27:52 -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 49379-03 for ; Wed, 25 Aug 2010 04:27:45 +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 AB207631E60 for ; Wed, 25 Aug 2010 01:27:45 -0300 (ADT) Received: from EGCRC-EX04.egcrc.org ([::1]) by EGCRC-EX03.egcrc.org ([::1]) with mapi; Tue, 24 Aug 2010 21:27:28 -0700 From: Tena Sakai To: Scott Marlowe CC: Kevin Grittner , "pgsql-admin@postgresql.org" , "ian.lea@gmail.com" Date: Tue, 24 Aug 2010 21:25:38 -0700 Subject: Re: trouble restoring database Thread-Topic: [ADMIN] trouble restoring database Thread-Index: ActD04qVceTE8v9sTZaBtADFOUZe1gAOgceK Message-ID: In-Reply-To: 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="iso-8859-1" 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/207 X-Sequence-Number: 35456 Hi Scott, Thank you for your quick tips. I shall remember zcat (and hopefully others). Regards, Tena Sakai On 8/24/10 2:30 PM, "Scott Marlowe" wrote: > On Tue, Aug 24, 2010 at 3:22 PM, Tena Sakai wrote= : >> Having said that, I think Ian is correct that I was missing -c flag in t= he >> command below: >> =A0gunzip ..../dumpall20100822.0.gz | /usr/local/pgsql/bin/psql -f - pos= tgres >=20 > Quick tip, you can use zcat to get the output of a gzipped file like: >=20 > zcat ..../dumpall20100822.0.gz|psql >=20 > There's also zgrep, zless, zegrep, zxpdf, and zdiff. All do what it > looks like they do. >=20 >=20 >> Since the file got uncompressed, I am now running the command: >> =A0psql -f /home/tsakai/Notes/postgres/dumpall20100822.0 >> and I think it is working. =A0It is giving messsages: >> =A0ERROR: =A0role "postgres" already exists >> =A0STATEMENT: =A0CREATE ROLE postgres; >> =A0ERROR: =A0database "testdb" already exists >> =A0STATEMENT: =A0CREATE DATABASE testdb WITH TEMPLATE =3D template0 OWNE= R =3D >> postgres ENCODING =3D 'UTF8'; >> =A0LOG: =A0checkpoints are occurring too frequently (5 seconds apart) >> =A0HINT: =A0Consider increasing the configuration parameter >> "checkpoint_segments". >>=20 >>=20 >> The last 2 lines are repeated many, many times. =A0This is not terribly >> Serious, is it? =A0(I will fix it via postgresql.conf file shortly.) >=20 > No. It's just telling you that from a performance perspective things > would be faster with more checkpoint segments. Unless you spend a > fair portion of your day restoring dbs, it's probably not big deal. > If your machines only do a little writing at a time then you can > probably leave it. However, increasing checkpoint segments does help > a lot if you do handle a fair bit of writes, and it's cheap and easy > to do.