Re: Postgres-R: primary key patches - Mailing list pgsql-hackers

From David Fetter
Subject Re: Postgres-R: primary key patches
Date
Msg-id 20080718141814.GR28307@fetter.org
Whole thread Raw
In response to Re: Postgres-R: primary key patches  (Markus Wanner <markus@bluegap.ch>)
Responses Re: Postgres-R: primary key patches  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Postgres-R: primary key patches  (Gregory Stark <stark@enterprisedb.com>)
Re: Postgres-R: primary key patches  (Markus Wanner <markus@bluegap.ch>)
List pgsql-hackers
On Fri, Jul 18, 2008 at 03:04:08PM +0200, Markus Schiltknecht wrote:
> Hello Chris,
>
> chris wrote:
>> Slony-I does the same, with the "variation" that it permits the
>> option of using a "candidate primary key," namely an index that is
>> unique+NOT NULL.
>>
>> If it is possible to support that broader notion, that might make
>> addition of these sorts of logic more widely useful.
>
> Well, yeah, that's technically not much different, so it would
> probably  be very easy to extend Postgres-R to work on any arbitrary
> Index.
>
> But what do we have primary keys for, in the first place? Isn't it
> exactly the *primay* key into the table, which you want to use for
> replication? Or do we need an additional per-table configuration
> option  for that? A REPLICATION KEY besides the PRIMARY KEY?

We have them because people are used to thinking in terms of a
"PRIMARY KEY," not because that concept is actually distinguishable
from a non-partial UNIQUE NOT NULL constraint.

While I'm a "chicken" rather than a "pig" on this project
<http://en.wikipedia.org/wiki/The_Chicken_and_the_Pig>, I believe that
covering the more general case right from the start would be a much
better plan.

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: Load spikes on 8.1.11
Next
From: "Heikki Linnakangas"
Date:
Subject: Re: [PATCH]-hash index improving