Skip to content

Cannot Render Schema on AWS/RDS #143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ericandrewschmidt opened this issue Dec 5, 2023 · 2 comments
Closed

Cannot Render Schema on AWS/RDS #143

ericandrewschmidt opened this issue Dec 5, 2023 · 2 comments

Comments

@ericandrewschmidt
Copy link

I am seeking to connect DuckDB to a Postgres 15.3 Aurora cluster using the Postgres scanner extension.

I can attach to Postgres using the following code; however, when I SHOW tables, there are none in the DuckDB catalog.
import duckdb duckdb.execute('INSTALL postgres;') duckdb.execute('LOAD postgres;') duckdb.execute('CALL postgres_attach("dbname=** \ user=** password=** \ host=** \ port=** connect_timeout=** application_name=**\ ");') duckdb.sql('USE main') duckdb.sql('SHOW TABLES').show()

│ name │ │ varchar │ ├─────────┤ │ 0 rows │

I can confirm that DuckDb is connecting and making calls, specifically querying for the tables names (from the Postgress session logs):

SELECT relname
FROM pg_class JOIN pg_namespace ON pg_class.relnamespace = pg_namespace.oid
JOIN pg_attribute ON pg_class.oid = pg_attribute.attrelid
WHERE relkind = 'r' AND attnum > 0 AND nspname = 'public'
GROUP BY relname
ORDER BY relname;

I can confirm that if I run this query from the DBeaver or command line, that schema/table info is returned. There are over 200 tables in the database.

What would prevent me from being able to see the tables in DuckDb with SHOW TABLES?

Also, I tried using the single table scan function, but that did not work either.

duckdb.sql('SELECT * FROM postgres_scan("dbname=** \ host=** \ user=** password=** port=** ", "**", "**") LIMIT 10;').show()

Failed to execute query "SELECT pg_is_in_recovery(), pg_export_snapshot(), (select count(*) from pg_stat_wal_receiver)": ERROR: Function pg_stat_get_wal_receiver() is currently not supported in Aurora.

Do you have any tips on how to get this working?

Thanks

@Mytherin
Copy link
Contributor

Mytherin commented Dec 5, 2023

This looks like a duplicate of #129, try the latest nightly build:

force install postgres_scanner from 'http://nightly-extensions.duckdb.org';

@ericandrewschmidt
Copy link
Author

ericandrewschmidt commented Dec 5, 2023 via email

@Mytherin Mytherin closed this as completed Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants