Re: logical changeset generation v3 - comparison to Postgres-R change set format

Поиск
Список
Период
Сортировка
От Markus Wanner
Тема Re: logical changeset generation v3 - comparison to Postgres-R change set format
Дата
Msg-id 50A7986A.70501@bluegap.ch
обсуждение исходный текст
Ответ на Re: logical changeset generation v3 - comparison to Postgres-R change set format  (Hannu Krosing <hannu@2ndQuadrant.com>)
Ответы Re: logical changeset generation v3 - comparison to Postgres-R change set format  (Hannu Krosing <hannu@2ndQuadrant.com>)
Re: logical changeset generation v3 - comparison to Postgres-R change set format  (Hannu Krosing <hannu@2ndQuadrant.com>)
Список pgsql-hackers
On 11/17/2012 02:30 PM, Hannu Krosing wrote:
> Is it possible to replicate UPDATEs and DELETEs without a primary key in
> PostgreSQL-R

No. There must be some way to logically identify the tuple. Note,
though, that theoretically any (unconditional) unique key would suffice.
In practice, that usually doesn't matter, as you rarely have one or more
unique keys without a primary.

Also note that the underlying index is useful for remote application of
change sets (except perhaps for very small tables).

In some cases, for example for n:m linking tables, you need to add a
uniqueness key that spans all columns (as opposed to a simple index on
one of the columns that's usually required, anyway). I hope for
index-only scans eventually mitigating this issue.

Alternatively, I've been thinking about the ability to add a hidden
column, which can then be used as a PRIMARY KEY without breaking legacy
applications that rely on SELECT * not returning that primary key.

Are there other reasons to want tables without primary keys that I'm
missing?

Regards

Markus Wanner



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Hannu Krosing
Дата:
Сообщение: Re: logical changeset generation v3 - comparison to Postgres-R change set format
Следующее
От: Michael Giannakopoulos
Дата:
Сообщение: Parser - Query Analyser