-
Notifications
You must be signed in to change notification settings - Fork 128
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
SSL Mode #3
Comments
The https://github.com/lib/pq library I am using should be able to support SSL, I just have not built it in yet. I actually even disabled it I see now. https://github.com/lukasmartinelli/pgfutter/blob/master/postgres.go#L80 I will add a flag to support this. Thanks for reporting. |
@lukasmartinelli Thanks for the quick response. We're actually planning to use PGFutter tonight to migrate from Mongo to PG on Heroku. I'm gonna fork this and see if I can get it to work simply by changing that line. |
You need the following flags right?
|
I was only going to add the sslmode flag, based on this Heroku doc: https://devcenter.heroku.com/articles/heroku-postgresql#external-connections-ingress I haven't tried it yet though, so I might need to specify the certs. I'm not sure tbh. |
Wow thats really cool to hear that. Yes that should work well, I wanted to write a guide how to do it with pgfutter. You just import the single document column and then you can start building out a new schema (this part will perhaps be a bit tedious). And PostgreSQL JSON / BSON support rocks!! |
There is a section about connection parameters at https://godoc.org/github.com/lib/pq |
That's exactly what we're doing. mongoexport -> pgfutter -> sql queries |
I think this won't require the certs:
|
wrt a post about switching from mongo to postgres, we're planning to write one this week. Would love to have your input on it. We've got a bunch of scripts (mostly ruby) and we're using a Node server to async the heavy lifting (mongoexport and pgfutter of ~10 mil records). |
Yes it seems that way from the documentation. |
So cool. I would love too. 10 million records should work fine. The maximum where I used pgfutter was about 1.5 billion JSON records. |
The import table will contain |
If that works it probably works for any PostgreSQL database and I can hardcode it directly as well. thebucknerlife@3845774#diff-dce2e070de6dd445c8a81742c8fc7d06R80 Easiest way to compile is using a docker container.
|
I'll start on it now. |
I'm getting this issue (just installed docker via homebrew):
|
If you install Docker toolbox you also need to source the env vars.
But if you're on OSX you might as well install Golang. Since Docker is a new concept as well :) |
I did install golang just now (I was going to try and do this Installing docker-machine now. If you can create an OSX binary for me, though, that would be great. |
That's quite tough to get started on Golang like that :) I would be completly lost. |
If you did go get with |
No sorry you need to do Does that work: https://github.com/lukasmartinelli/pgfutter/releases/download/v0.3.2/pgfutter_ssl |
Trying the binary it now. Yeah, the gopath setup is a little weird. Was just fumbling with it. |
It worked! I just tested pgfutter against pgfutter_ssl and the ssl worked with Heroku Postgres. So the difference between the static binary and what I've got is the static binary has golang embedded in it? |
@lukasmartinelli thank you so much for helping us with this! |
To be honest it also took some time for me to get the project compiling again - was on a new OSX machine after Linux and had to setup Golang as well - it is indeed a bit fiddly.
Yeeeah! I will include it into master then.
Yes from what I know you can build a binary that has the golang runtime linked statically.
Np. I am still psyched someone can actually use pgfutter :) |
I wasn't able to build the project, not yet. I only tried to run the binary you sent us and it worked.
@lukasmartinelli Just made a PR for the change. |
Now I'm trying to build the project myself. Here are the steps I've been following: I set my
So that's where I am on my machine. The binary you sent still works though. |
|
That worked. Now I understand it. Thanks a lot @lukasmartinelli you made this much easier for us tonight. Will let you know how it goes! 👍 |
Migration worked? |
Bump.
|
Hey @lukasmartinelli the migration went very well - actually better than expected! We've seen a dramatic drop in memory issues on Rails since switching to PG from Mongo. Took us all night, until about 6am, but we got it done. PGFutter was one of the crucial tools for the migration. Thank you again for being so diligent and responsive. A nice way to learn some Golang to 😄 Are you going to be adding an SSL flag to the binary? |
Implemented the flag in e982dd1. |
Hi,
I'm trying to use PGFutter to import Json into a Heroku Postgres instance.
I've got everything setup but I'm getting this error:
pq: no pg_hba.conf entry for host "198.11.218.38", user "xxx", database "xxx", SSL off
.I can't find a flag to enable
sslmode=require
. Is that possible? Or is there another issue I'm facing?Thanks!
The text was updated successfully, but these errors were encountered: