From: Tom Lane <tgl@sss.pgh.pa.us>
To: Simon Riggs <simon@2ndQuadrant.com>
Cc: Peter Eisentraut <peter_e@gmx.net>
Cc: samana srikanth <samanasrikanth@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Postgressql backup/restore question
Date: Wed, 04 Mar 2009 17:19:47 -0500
Message-ID: <8151.1236205187@sss.pgh.pa.us> (raw)
In-Reply-To: <1236204830.31880.122.camel@ebony.2ndQuadrant>
References: <e42828680903040356o307031c2k7898562d8e2d275c@mail.gmail.com>
<49AE8958.3070909@gmx.net>
<1236198515.31880.108.camel@ebony.2ndQuadrant>
<6347.1236199034@sss.pgh.pa.us>
<1236200757.31880.116.camel@ebony.2ndQuadrant>
<7123.1236202022@sss.pgh.pa.us>
<1236204830.31880.122.camel@ebony.2ndQuadrant>
Simon Riggs <simon@2ndQuadrant.com> writes:
> On Wed, 2009-03-04 at 16:27 -0500, Tom Lane wrote:
>> Simon Riggs <simon@2ndQuadrant.com> writes:
> On Wed, 2009-03-04 at 15:37 -0500, Tom Lane wrote:
>>>> It's not as easy as all that. What will you do with updates to shared
>>>> catalogs?
>>
>>> Apply them.
>>
>> ... which leaves your other databases in inconsistent states.
> Which is not a problem if you didn't want to restore them in the first
> place.
Only for small values of "not a problem". For example, you might have
pg_shdepend entries saying that various objects in some other database
depend on some role. If you then want to drop the role, you can't;
and you can't attach to the other database to get rid of the objects,
since it's not there. You'd also still have pg_database entries
pointing at the not-there databases.
This behavior might be all right for an emergency recovery kind of tool,
but I can't see us considering it a supported feature.
The larger point though is that I suspect what the OP really is looking
for is "restore just this one database into my existing cluster, without
breaking the other databases that are already in it". There is zero
chance of ever doing that with a WAL-based backup --- transaction ID
inconsistencies would break it, even without considering the contents
of shared catalogs.
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, simon@2ndQuadrant.com, peter_e@gmx.net, samanasrikanth@gmail.com
Subject: Re: Postgressql backup/restore question
In-Reply-To: <8151.1236205187@sss.pgh.pa.us>
* 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