Re: augmenting MultiXacts to improve foreign keys

From: Florian Pflug <fgp(at)phlo(dot)org>
To: Noah Misch <noah(at)2ndQuadrant(dot)com>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: augmenting MultiXacts to improve foreign keys
Date: 2011-08-10 08:15:49
Message-ID: 562B5BB5-DA06-4CD6-881B-A99D1EEC8CA6@phlo.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2011-08-10 08:44:46 Re: Reduced power consumption in autovacuum launcher process
Previous Message Florian Pflug 2011-08-10 08:14:10 Re: augmenting MultiXacts to improve foreign keys