Alvaro Herrera <alvherre@xxxxxxxxxxxxxxx> writes: > ktm@xxxxxxxx wrote: >> Each SELECT opens your FOREIGN TABLE so you are opening it 10 times. This is >> hardcoded by a #define in ./src/backend/storage/file/fd.c during the build so >> you would need to recompile the software yourself to change it. Can you re- >> write your query using a single SELECT or possibly read the data into a >> temporary table for processing? > To me this sounds like a bug in whatever FDW is being used. Yeah, we need to fix file_fdw so that it's using virtual rather than physical file descriptors ... regards, tom lane -- Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin