Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sTMB3-00FOYI-SW for pgsql-bugs@arkaria.postgresql.org; Mon, 15 Jul 2024 13:55:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sTMB1-00ALVs-SN for pgsql-bugs@arkaria.postgresql.org; Mon, 15 Jul 2024 13:55:39 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sTMB1-00ALVk-Ja for pgsql-bugs@lists.postgresql.org; Mon, 15 Jul 2024 13:55:39 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sTMAt-002AjD-3N for pgsql-bugs@lists.postgresql.org; Mon, 15 Jul 2024 13:55:36 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 46FDtSKi3147483; Mon, 15 Jul 2024 09:55:28 -0400 From: Tom Lane To: Etsuro Fujita cc: 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: References: <17889-e8c39a251d258dda@postgresql.org> <1852635.1682808624@sss.pgh.pa.us> Comments: In-reply-to Etsuro Fujita message dated "Mon, 15 Jul 2024 19:51:03 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <3147481.1721051728.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 15 Jul 2024 09:55:28 -0400 Message-ID: <3147482.1721051728@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Etsuro Fujita writes: > On Fri, Jul 5, 2024 at 9:49=E2=80=AFPM Etsuro Fujita wrote: >> To fix, how about instead modifying postgres_fdw so that if the remote >> server is v15 or later, it just recreates a cursor when rewinding it >> is needed, like the attached? Uh ... does this ensure that the data hasn't changed? regards, tom lane