Re: Writable foreign tables: how to identify rows - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Writable foreign tables: how to identify rows
Date
Msg-id 27035.1363188913@sss.pgh.pa.us
Whole thread Raw
In response to Re: Writable foreign tables: how to identify rows  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-hackers
Merlin Moncure <mmoncure@gmail.com> writes:
> As long as lock as held between ctid examination and row modification
> you are ok.  didn't read the patch, just pointing that out (history is
> full of client side drivers that did not do this properly).

> I also might have missed some of the finer contextual points of the
> discussion here: I was thinking that you are identifying rows on the
> client over fetch transaction A to write back in transaction B.  If
> that is the case, ctid based identification to me is full of issues

Absolutely --- you can't rely on ctid across transactions.  postgres_fdw
isn't doing that though, just using it to update or delete rows that it
locked earlier in the same remote transaction.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: Writable foreign tables: how to identify rows
Next
From: "David E. Wheeler"
Date:
Subject: Re: Duplicate JSON Object Keys