Error copying postgres DB to duckdb using build 0.9.3.dev2938 when using the new ATTACH functionality
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by running the provided Python reproduction with PostgreSQL 16 and DuckDB 0.9.3.dev2938, then trace the ATTACH and COPY FROM DATABASE path for PostgreSQL schemas. Confirm the behavior against a current build and identify why pg_toast is queried as a missing schema. Done means copying the database completes without the CatalogException and preserves the source tables and views.
Written by the indexing model from the issue text.
Description
What happens?
According to the documentation database copying should be available when using dev version of DuckDB but I get the following error when trying to copy a postgres database to a duckdb database. I know its a dev release but thought you guys might be interested
CatalogException: Catalog Error: Schema with name pg_toast does not exist!
To Reproduce
Installed Postgres v16 on my local system and created a database with one table. Next ran the following code fragment after pip installing 0.9.3.dev2938 of duckdb
import duckdb as db
db.sql("ATTACH 'dbname=postgres user=my_db_user password=my_db_pass host=127.0.0.1' AS db_postgres (TYPE postgres)")
attach a DuckDB file
db.sql("ATTACH 'database.db' AS ddb")
export all tables and views from the Postgres database to the DuckDB file
db.sql("COPY FROM DATABASE db_postgres TO ddb")
OS:
Windows 11
DuckDB Version:
0.9.3.dev2938
DuckDB Client:
3.11
Full Name:
Tom Reid
Affiliation:
None
Have you tried this on the latest nightly build?
I have tested with a nightly build
Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?
- Yes, I have
- Dominant language
- C++
- Stars
- 373
- Forks
- 112
- Avg merge
- 9h 48m
- Merged PRs (30d)
- 28
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from duckdb/duckdb-postgres
-
Difficulty 3/5 1-2 days Newbie friendliness 62/100
duckdb/duckdb-postgres#618 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
duckdb/duckdb-postgres#594 · 4 comments ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
duckdb/duckdb-postgres#575 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 74/100
duckdb/duckdb-postgres#564 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
duckdb/duckdb-postgres#491 · 1 comment ·
Maintainers usually reply within 1 day
All issues in duckdb/duckdb-postgres
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 91/100
FujiNetWIFI/fujinet-firmware#2045 ·
Maintainers usually reply within 1 day
-
(S1 - Need confirmation)
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
CleverRaven/Cataclysm-DDA#89159 ·
Maintainers usually reply within 1 day
-
area:libnvmpi bug P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gjrtimmer/jetson-nvmpi#33 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
bug(wasi_crypto): ArrayOutput::pull reports the wrong all-pulled flagPossibly taken @Yashbhu claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day