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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-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

Browse pgsql-general by date

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

Browse pgsql-hackers by date

  From Date Subject
Next Message scott.marlowe 2003-10-01 19:11:02 Re: Thoughts on maintaining 7.3
Previous Message Andrew Dunstan 2003-10-01 18:55:51 Re: Thoughts on maintaining 7.3