Skip site navigation (1) Skip section navigation (2)

Re: ADD FOREIGN KEY

From: Christopher Browne <cbbrowne(at)libertyrms(dot)info>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: ADD FOREIGN KEY
Date: 2003-10-01 19:04:37
Message-ID: 60u16ssrsq.fsf@dev6.int.libertyrms.info (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackers
mkoi-pg(at)aon(dot)at (Manfred Koizar) writes:
> On Tue, 30 Sep 2003 08:00:07 -0400, Christopher Browne
> <cbbrowne(at)acm(dot)org> wrote:
>>I would be pretty "game" for a near-single-user-mode approach that
>>would turn off some of the usual functionality that we knew we didn't
>>need because the data source was an already-committed-and-FK-checked
>>set of data.
>
> Single user mode is a good idea, IMHO.  But it should only make sure
> that there is not more than one user connected to the database (or
> to the postmaster).

Well, there already exists an honest-to-goodness single-user mode,
where you start a postmaster directly.  

This is the way that you need to connect to PG in order to be able to
regenerate indexes for any "nailed" system tables.

If I could be certain that a "pg_fast_recovery" program could run
several times faster than the existing approach of "psql <
recoveryfile.sql", then it might well be worthwhile to have something
invoked something like the following:

% zcat /backups/latest_backup.gz | postmaster -D $PGDATA -F -N 0 --fast-recovery-off-ACID --log /tmp/recovery.log mydb

-N 0 means that there won't even be as many as one user connected to
the database.

I would, given an ideal world, prefer to be able to have a connection
or two live during this to let me monitor the DB and even get an early
peek at the data.  But if I could save a few hours of recovery time,
it might be livable to lose that.
-- 
select 'cbbrowne' || '@' || 'libertyrms.info';
<http://dev6.int.libertyrms.com/>
Christopher Browne
(416) 646 3304 x124 (land)

In response to

Responses

pgsql-hackers by date

Next:From: scott.marloweDate: 2003-10-01 19:11:02
Subject: Re: Thoughts on maintaining 7.3
Previous:From: Andrew DunstanDate: 2003-10-01 18:55:51
Subject: Re: Thoughts on maintaining 7.3

pgsql-general by date

Next:From: Tom LaneDate: 2003-10-01 22:43:43
Subject: Re: ADD FOREIGN KEY
Previous:From: Jan WieckDate: 2003-10-01 18:12:36
Subject: Re: Divide by zero...

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group