Re: Writable foreign tables: how to identify rows

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Writable foreign tables: how to identify rows
Дата
Msg-id 26208.1363186795@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Writable foreign tables: how to identify rows  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-hackers
Merlin Moncure <mmoncure@gmail.com> writes:
> I just find it odd that rowid concept is used at all without strong
> guarantee that the record you are referencing is the one you are
> supposed to be referencing.  Basically I'm saying PKEY semantics are
> the correct ones and that ctid is ok to use iff they match the pkey
> ones.  I don't think this is possible unless you maintain a remote
> lock on the ctid between when you fetch it and do some other
> operation.

postgres_fdw does maintain such a lock (it does SELECT FOR UPDATE when
scanning an update/delete target table).  However, I'm not exactly sure
why you think a pkey-based design would be free of such hazards.  pkeys
aren't immutable either ...
        regards, tom lane



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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: Writable foreign tables: how to identify rows
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Writable foreign tables: how to identify rows