Comments (5)
Some basic details would be useful:
- PostgreSQL version
- Firebird version
firebird_fdw
andlibfq
versions
To assist diagnosing the issue, please set client_min_messages
to debug2
, re-execute the query and attach the output.
from firebird_fdw.
Hello, thank you for replying.
Postgres version: PostgreSQL 10.5 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28), 64-bit
Firebird version: 2.5.9
Firebird_fdw: postgresql10-firebird_fdw-0.5.0-1.x86_64
Libfq: libfq-0.3.0-1.x86_64
from firebird_fdw.
Thanks for the info.
Unfortunately I can't reproduce the issue. Could you execute the query contained in the debug.txt
output, i.e.
SELECT COUNT(*) FROM (
/* your query here */
)
and report the output?
What is happening here is that the FDW is trying to fetch an estimate of the table's row count for the PostgreSQL planner. For foreign tables defined as a query, the only way of doing this is to execute the query wrapped in SELECT COUNT(*) FROM ...
, which should theoretically only ever return one row. For some reason this is not happening, but the debug output doesn't say how many rows are being returned.
As a workaround, and something I've been meaning to do anyway, I've added a table option estimated_row_count
, which makes it possible to specify the approximate number of rows the query would return, and side-step the potentially expensive SELECT COUNT(*) FROM ...
. This will be in the next release, which should be available in the near future.
It would still be useful to find out what is going on with the SELECT COUNT(*) FROM ...
query.
from firebird_fdw.
As a workaround, and something I've been meaning to do anyway, I've added a table option
estimated_row_count
, which makes it possible to specify the approximate number of rows the query would return, and side-step the potentially expensiveSELECT COUNT(*) FROM ...
. This will be in the next release, which should be available in the near future.It would still be useful to find out what is going on with the
SELECT COUNT(*) FROM ...
query.
In the meantime I've made a new release (1.0.0) which contains this functionality, and also better logging of the issue you encountered; it would be helpful if you could try the query with this release and let me know the result.
from firebird_fdw.
Hello,
Thank you very much. Now with version 1.0.0 worked correctly, follow the debug log attachment
debug2.txt
from firebird_fdw.
Related Issues (20)
- Extra data or data not completed in SELECT for hierarchical data in FOREIGN TABLE HOT 5
- Problems with quoted names of objects in Postgres and Firebird HOT 7
- Documentation not complete HOT 1
- IMPORT FOREIGN SCHEMA behaviour HOT 6
- Do not exist library/package to postgresql12-firebird_fdw HOT 3
- 1.2.0 build error HOT 1
- User survey - how and why do you you use firebird_fdw? And what features are missing? HOT 2
- Lost hierarchy chain in query HOT 10
- Undocumented feature or access error in firebird_version function HOT 2
- PostgreSQL 14 support HOT 4
- Change libfq submodule link HOT 1
- Cannot load extension into PostgreSQL 15 - undefined symbol: pg_atoi HOT 6
- Failed to Import Table from Foreign Schema HOT 13
- Foreign server name quoting during IMPORT FOREIGN SCHEMA HOT 1
- 1.3.0 build error on Fedora 37 (and warning on RHEL 9) HOT 3
- Firebird array support
- Cannot load extension into PostgreSQL 15 and 14 - libfq-0.5.0.so HOT 1
- PostgreSQL 16 support HOT 4
- UUID support HOT 4
- Question: Option to Force Conversion of Strings to a Specific Charset HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from firebird_fdw.