pgloader icon indicating copy to clipboard operation
pgloader copied to clipboard

URL paramter options=endpoint not working

Open maxbec opened this issue 2 years ago • 3 comments

  • [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 avatar Oct 23 '23 06:10 maxbec

@maxbec Were you able to figure this out and/or use a different tool?

joshstrange avatar Jan 06 '24 16:01 joshstrange

I'm also having issue with Neon postgres using the connection string provided by the Neon Console.

tddschn avatar Mar 06 '24 17:03 tddschn

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

dlbnco avatar Mar 21 '24 19:03 dlbnco