pgloader
pgloader copied to clipboard
URL paramter options=endpoint not working
-
[x] pgloader --version
pgloader version "3.6.9" compiled with SBCL 2.3.8 -
[x] did you test a fresh compile from the source tree?
No
-
[x] did you search for other similar issues?
-
[x] how can I reproduce the bug?
pgloader -d "mysql://[user]:[password]@[host]:[port]/db" "postgres://default:[password]@ep-morning-disk-[id].eu-central-1.postgres.vercel-storage.com:5432/[dbname]?options=endpoint%3Dep-morning-disk-[id]&sslmode=require"
- [x] pgloader output you obtain
2023-10-23T02:18:19.008822-04:00 FATAL Failed to parse "postgres://default:[password]@ep-morning-disk-[id].eu-central-1.postgres.vercel-storage.com:5432/[dbname]?options=endpoint%3Dep-morning-disk-[id]&sslmode=require" as a PostgreSQL database URI.
It seems like the options URI argument ist not supported. But neon.tech databases require it. Any idea how to fix this?
@maxbec Were you able to figure this out and/or use a different tool?
I'm also having issue with Neon postgres using the connection string provided by the Neon Console.
Put the endpoint in the password field instead, followed by ;:
pgloader -d "mysql://[user]:[password]@[host]:[port]/db" "postgres://default:endpoint=ep-morning-disk-[id];[password]@ep-morning-disk-[id].eu-central-1.postgres.vercel-storage.com:5432/[dbname]?sslmode=require"
If you get a parsing error because of the ;, try creating a config file and doing pgloader file.load.
Source: https://neon.tech/docs/import/migrate-mysql#retrieve-your-neon-database-connection-string