Re: Writable foreign tables: how to identify rows

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: Shigeru Hanada <shigeru(dot)hanada(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Writable foreign tables: how to identify rows
Date: 2013-03-13 14:59:55
Message-ID: 26208.1363186795@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Merlin Moncure <mmoncure(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2013-03-13 15:02:14 Re: Writable foreign tables: how to identify rows
Previous Message Merlin Moncure 2013-03-13 14:51:59 Re: Writable foreign tables: how to identify rows