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

From Markus Wanner
Subject Re: Postgres-R: primary key patches
Date
Msg-id 4880CF0A.4010709@bluegap.ch
Whole thread Raw
In response to Re: Postgres-R: primary key patches  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Hi,

Alvaro Herrera wrote:
> I think the point here is that you need to distinguish which tuple you
> need to update.  For this, our Replicator uses the primary key only;
> there's no way to use another candidate key (unique not null).  It would
> certainly be possible to use a different candidate key,

Yeah, and for this to work, the *sender* needs to decide on a key to use.

> but as far as I
> know no customer has ever requested this.

I can't see the use case for a separate REPLICATION KEY, different from 
the PRIMARY KEY, either..

> (FWIW we don't send the old values -- only the original PK columns, the
> values of columns that changed, and the "update mask" in terms of
> heap_modify_tuple.)

Yup, that's pretty much the same what I'm doing for Postgres-R.

Regards

Markus


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: typedefs for indent
Next
From: Bruce Momjian
Date:
Subject: Re: .psqlrc output for \pset commands