Re: trouble restoring database

From: Tena Sakai <tsakai(at)gallo(dot)ucsf(dot)edu>
To: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Cc: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>, "ian(dot)lea(at)gmail(dot)com" <ian(dot)lea(at)gmail(dot)com>
Subject: Re: trouble restoring database
Date: 2010-08-25 04:25:38
Message-ID: C899E952.C178%tsakai@gallo.ucsf.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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" <scott(dot)marlowe(at)gmail(dot)com> wrote:

> On Tue, Aug 24, 2010 at 3:22 PM, Tena Sakai <tsakai(at)gallo(dot)ucsf(dot)edu> wrote:
>> 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 - postgres
>
> Quick tip, you can use zcat to get the output of a gzipped file like:
>
> zcat ..../dumpall20100822.0.gz|psql
>
> There's also zgrep, zless, zegrep, zxpdf, and zdiff. All do what it
> looks like they do.
>
>
>> 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 = template0 OWNER =
>> postgres ENCODING = '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.)
>
> 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.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Gnanakumar 2010-08-25 07:30:55 last_autovacuum & last_autoanalyze showing NULL
Previous Message Scott Marlowe 2010-08-25 03:44:41 Re: PostgreSQL 8.4 x Win 2008 - slow connection