Re: Postgres-R: primary key patches

From: chris <cbbrowne(at)ca(dot)afilias(dot)info>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Postgres-R: primary key patches
Date: 2008-07-17 15:01:16
Message-ID: 87sku8wo5f.fsf@dba2.int.libertyrms.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

markus(at)bluegap(dot)ch (Markus Wanner) writes:
> as you might know, Postgres-R relies on primary keys to address tuples
> of a table. It cannot replicate tables without a primary key.

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.

> Primary keys currently aren't really used within the executor, so I
> had to extended and modify Postgres here and there, to get the
> required information. To ease reviewing I have split out these
> modifications and present them here as two separate little patches.

I know Jan Wieck has in mind the idea of adding an interface to enable
doing highly efficient IUD (Insert/Update/Delete) via generating a way
to do direct heap updates, which would be *enormously* more efficient
than the present need (in Slony-I, for instance) to parse, plan and
execute thousands of IUD statements. For UPDATE/DELETE to work
requires utilizing (candidate) primary keys, so there is some
seemingly relevant similarity there.
--
select 'cbbrowne' || '@' || 'linuxfinances.info';
http://cbbrowne.com/info/lsf.html
Rules of the Evil Overlord #145. "My dungeon cell decor will not
feature exposed pipes. While they add to the gloomy atmosphere, they
are good conductors of vibrations and a lot of prisoners know Morse
code." <http://www.eviloverlord.com/>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2008-07-17 15:48:27 Re: autovacuum crash due to null pointer
Previous Message Alvaro Herrera 2008-07-17 14:39:42 Re: [COMMITTERS] pgsql: Add column storage type to psql \d+ display.