From: John R Pierce <pierce@hogranch.com>
To: pgsql-general@postgresql.org
Subject: Re: pg_restore
Date: Wed, 30 Mar 2011 14:36:50 -0700
Message-ID: <4D93A272.9000101@hogranch.com> (raw)
In-Reply-To: <AANLkTinm7g6TTQLgE9NKWmRd8nfbG3OXbke20bdcuu0Q@mail.gmail.com>
References: <AANLkTinm7g6TTQLgE9NKWmRd8nfbG3OXbke20bdcuu0Q@mail.gmail.com>
On 03/30/11 1:56 PM, Mike Orr wrote:
> MySQL simply locks the tables, drops/recreates them, loads the data,
> and unlocks the tables. Other connections have to wait but they don't
> have to be closed/reopened. The PostgreSQL manual recommends restoring
> into an empty database using template0, which would require first
> closing the other connections and then dropping the database. It would
> also take unnecessary time to recreate the database and tables that
> aren't changing. So I'm wondering if there's a less obtrusive way to
> refresh the data.
its a backup server, right? so noone is accessing it, are they?
rather than using pg_dump -Fc |pg_restore, you can use pg_dump | psql
... and you can tell pg_dump in this mode to only dump specified tables.
however, you might look at PITR and/or WAL log shipping rather than
dump/restore. this would only update new data, and when you playback
the WAL log on the backup server bring it up to whatever point in time
you want.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: pierce@hogranch.com
Subject: Re: pg_restore
In-Reply-To: <4D93A272.9000101@hogranch.com>
References: <AANLkTinm7g6TTQLgE9NKWmRd8nfbG3OXbke20bdcuu0Q@mail.gmail.com> <4D93A272.9000101@hogranch.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox