duckdb / postgres_scanner

https://duckdb.org/docs/extensions/postgres
MIT License
234 stars 37 forks source link

PG_ATTACH takes very long to execute #96

Closed dberardo-com closed 1 year ago

dberardo-com commented 1 year ago

What happens?

The pg_attach method takes quite long to execute. is there any way to speed that up?

To Reproduce

i am using pg_attach on a patroni replica on a server that has many DBs, but only attaching to a specific one. The query sometimes even a minute or more to return.

i have perhaps 20 or 30 tables in this DB, but with really few 100 of rows per table.

Is there any way i can debug / speed up the process ?

OS:

linux

PostgreSQL Version:

14

DuckDB Version:

0.7.1

DuckDB Client:

python

Full Name:

check other issues

Affiliation:

check other issues

Have you tried this on the latest master branch?

Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?

Mytherin commented 1 year ago

Thanks for the report! This should be addressed now in https://github.com/duckdb/postgres_scanner/pull/111 using the new ATTACH syntax.