Re: ADD FOREIGN KEY

From: Manfred Koizar <mkoi-pg(at)aon(dot)at>
To: Christopher Browne <cbbrowne(at)acm(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: ADD FOREIGN KEY
Date: 2003-10-01 18:02:52
Message-ID: 8m5mnvg8rtttte9nf1uhe2uhgn6cl04eik@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

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). Everything else should depend on special GUC
variables that are only settable in single user mode:

db=> SET disable-fk-verification = true;
ERROR: "disable-fk-verification" can only be set in single user mode
db=> SET SINGLE USER MODE ON;
ERROR: permission denied
HINT: Must be superuser or owner of database "db".
db=> \c - dbo
You are now connected as new user "dbo".
db=> SET SINGLE USER MODE ON;
ERROR: cannot enter single user mode
HINT: You are not the only user connected to database "db".
-- after other users have logged out ...
db=> SET SINGLE USER MODE ON;
SET
db=> SET disable-fk-verification = true;
SET

Single user mode would also help in several cases where now a
standalone backend is required ...

Servus
Manfred

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jan Wieck 2003-10-01 18:12:36 Re: Divide by zero...
Previous Message Dann Corbit 2003-10-01 18:01:59 Re: PGAdmin III 1.0.0 Released

Browse pgsql-hackers by date

  From Date Subject
Next Message David Blasby 2003-10-01 18:50:40 query plan different for "SELECT ..." and "DECLARE CURSOR ..."?
Previous Message Joshua D. Drake 2003-10-01 17:58:51 Re: Thoughts on maintaining 7.3