pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Etsuro Fujita <etsuro.fujita@gmail.com>
Cc: eric.cyr@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17889: Invalid cursor direction for a foreign scan that reached the fetch_size (MOVE BACKWARD ALL IN cX)
Date: Sat, 29 Apr 2023 18:50:24 -0400
Message-ID: <1852635.1682808624@sss.pgh.pa.us> (raw)
In-Reply-To: <CAPmGK14u-jGV-4B2_T90Lf5U5Az2d5wH0hV3vfUbWkw2d4UjBA@mail.gmail.com>
References: <17889-e8c39a251d258dda@postgresql.org>
	<CAPmGK17vjjy0Yb=jyK_iCL5rpGW7w1imv=kQB7rkk9xMO4cEjA@mail.gmail.com>
	<CAPmGK16DNvnReiNyKprn4O-j5S2uGzUrcDANaF49md1-ejjjQw@mail.gmail.com>
	<CAPmGK14u-jGV-4B2_T90Lf5U5Az2d5wH0hV3vfUbWkw2d4UjBA@mail.gmail.com>

Etsuro Fujita <etsuro.fujita@gmail.com> writes:
>> I think that the root cause is in commit d844cd75a, which disallowed
>> rewinding and then re-fetching forwards in a NO SCROLL cursor.  I am
>> not sure what to do about this issue, but I am wondering whether that
>> commit is too restrictive, because 1) these examples would work just
>> fine without that commit, and 2) we still allow
>> rewind-and-fetch-forwards in a SCROLL cursor even when the query
>> includes volatile functions.

Well, the short answer here is that postgres_fdw is depending on
something that has squishy semantics, for the reasons enumerated
in d844cd75a (see also [1]).  Maybe we can carve out an exception
that's narrow enough that we can convince ourselves it's not squishy,
but I'm not very sure what the rules should be.

			regards, tom lane

[1] https://www.postgresql.org/message-id/201144.1682350828%40sss.pgh.pa.us





view thread (12+ messages)  latest in thread

Message-ID: <1852635.1682808624@sss.pgh.pa.us>
Permalink:  ../1852635.1682808624@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1852635.1682808624@sss.pgh.pa.us

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, etsuro.fujita@gmail.com, eric.cyr@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17889: Invalid cursor direction for a foreign scan that reached the fetch_size (MOVE BACKWARD ALL IN cX)
  In-Reply-To: <1852635.1682808624@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