From: Tom Lane <tgl@sss.pgh.pa.us>
To: Steve Baldwin <steve.baldwin@gmail.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: Locking and postgres_fdw extension
Date: Fri, 20 Nov 2020 01:29:17 -0500
Message-ID: <1277128.1605853757@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKE1AiaRGUUB11quexXcjRL45bmkCiNzsevF-TSmKDB+tQgHNw@mail.gmail.com>
References: <CAKE1AiaRGUUB11quexXcjRL45bmkCiNzsevF-TSmKDB+tQgHNw@mail.gmail.com>
Steve Baldwin <steve.baldwin@gmail.com> writes:
> However if I want it to fail immediately if unable to obtain the lock, it
> seems nowait is ignored for foreign tables (or at least with my version of
> postgres_fdw).
Hmm ... this seems to be intentional, per the comments in
deparseLockingClause():
* For now, just ignore any [NO] KEY specification, since (a)
* it's not clear what that means for a remote table that we
* don't have complete information about, and (b) it wouldn't
* work anyway on older remote servers. Likewise, we don't
* worry about NOWAIT.
However, it's not super clear whether the concern about NOWAIT is just
that the remote server might be too old to know that keyword, or
whether there's some deeper issue.
(I see your example is also falling foul of the non-implementation
of NO KEY, which might be confusing matters still more.)
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, steve.baldwin@gmail.com
Subject: Re: Locking and postgres_fdw extension
In-Reply-To: <1277128.1605853757@sss.pgh.pa.us>
References: <CAKE1AiaRGUUB11quexXcjRL45bmkCiNzsevF-TSmKDB+tQgHNw@mail.gmail.com> <1277128.1605853757@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox