Re: BUG #17889: Invalid cursor direction for a foreign scan that reached the fetch_size (MOVE BACKWARD ALL IN cX) - Mailing list pgsql-bugs

From Etsuro Fujita
Subject Re: BUG #17889: Invalid cursor direction for a foreign scan that reached the fetch_size (MOVE BACKWARD ALL IN cX)
Date
Msg-id CAPmGK17vjjy0Yb=jyK_iCL5rpGW7w1imv=kQB7rkk9xMO4cEjA@mail.gmail.com
Whole thread Raw
In response to BUG #17889: Invalid cursor direction for a foreign scan that reached the fetch_size (MOVE BACKWARD ALL IN cX)  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #17889: Invalid cursor direction for a foreign scan that reached the fetch_size (MOVE BACKWARD ALL IN cX)
List pgsql-bugs
On Fri, Apr 7, 2023 at 5:21 AM PG Bug reporting form
<noreply@postgresql.org> wrote:
> The scenario is the following:
> On DB 1 have
> 3 tables, a view using a where clause on table 1 and a view using a inner
> join on table 1 and 2.
>
> On DB 2 have
> A fdw server(with use_remote_estimate set to true), 3 foreign tables, one
> for each view and one for table 3 and a view on the foreign table of view of
> table 1 (with a cte using a function and used in where clause)
>
> On DB 2 execute a SELECT on view of foreign table 1 with a join on foreign
> table 2 with a where clause using a subquery on foreign table 3.
>
> If the SELECT would return an amount of rows equal or greater than the fetch
> size of foreign table of view of table 1 the error will occur.

> The same scenario was tested on Postgres 10 and 14, both worked without
> error.

> The error is the following:
>
> ERROR: cursor can only scan forward Hint:
> Declare it with SCROLL option to enable backward scan.
> Where: remote SQL command: MOVE BACKWARD ALL IN c3

Will look into this.  Thanks for the report!

Best regards,
Etsuro Fujita



pgsql-bugs by date:

Previous
From: Richard Guo
Date:
Subject: Re: BUG #17888: Incorrect memory access in gist__int_ops for an input array with many elements
Next
From: "Shikha, Kumari - Dell Team"
Date:
Subject: Test mail for pgsql-admin