Re: augmenting MultiXacts to improve foreign keys - Mailing list pgsql-hackers

From Florian Pflug
Subject Re: augmenting MultiXacts to improve foreign keys
Date
Msg-id 562B5BB5-DA06-4CD6-881B-A99D1EEC8CA6@phlo.org
Whole thread Raw
In response to Re: augmenting MultiXacts to improve foreign keys  (Noah Misch <noah@2ndQuadrant.com>)
List pgsql-hackers
On Aug10, 2011, at 08:45 , Noah Misch wrote:
> On Tue, Aug 09, 2011 at 09:41:00PM +0200, Florian Pflug wrote:
>> Couldn't we simply give the user a way to specify, per column, whether or
>> not that column is a "KEY" column? Creating a foreign key constraint could
>> still implicitly mark all referenced columns as KEY columns, but columns
>> would no longer be "KEY" columns simply because they're part of a UNIQUE
>> constraint. Users would be free to add arbitrary columns to the set of
>> "KEY" columns by doing ALTER TABLE ALTER COLUMN SET KEY.
> 
> What would be the use case for manually expanding the set of key columns?

You'd use that if you implemented a FK-like constraint (e.g. a FK on an
array-values field). Without a way to manually expand the set of KEY columns,
such a non-core FK constraint couldn't use the lighter locks.

best regards,
Florian Pflug



pgsql-hackers by date:

Previous
From: Florian Pflug
Date:
Subject: Re: augmenting MultiXacts to improve foreign keys
Next
From: Peter Geoghegan
Date:
Subject: Re: Reduced power consumption in autovacuum launcher process