Re: possible issue in postgres_fdw batching

2024-08-19 Thread Tomas Vondra
On 8/19/24 01:40, Tom Lane wrote: > Tomas Vondra writes: >> Consider this simplified example: > >> CREATE TABLE t (a INT); >> CREATE FOREIGN TABLE f (a INT) SERVER loopback >> OPTIONS (table_name 't'); >> CREATE FUNCTION counter() RETURNS int LANGUAGE sql AS

Re: possible issue in postgres_fdw batching

2024-08-18 Thread Tom Lane
Tomas Vondra writes: > Consider this simplified example: > CREATE TABLE t (a INT); > CREATE FOREIGN TABLE f (a INT) SERVER loopback > OPTIONS (table_name 't'); > CREATE FUNCTION counter() RETURNS int LANGUAGE sql AS > $$ SELECT COUNT(*) FROM f $$; > And n

possible issue in postgres_fdw batching

2024-08-18 Thread Tomas Vondra
Hi, There's a pgsql-bugs report [1] about a behavior change with batching enabled in postgres_fdw. While I ultimately came to the conclusion the behavior change is not a bug, I find it annoying. But I'm not 100% sure about the "not a bug" conclusion, and and the same time I can't think of a way to