-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Use db.Conn to fix postgres lock/unlock #4
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conflicts need to be resolved
@@ -33,7 +35,8 @@ type Config struct { | |||
} | |||
|
|||
type Postgres struct { | |||
db *sql.DB | |||
// Locking and unlocking need to use the same connection | |||
db *sql.Conn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename db
to conn
@@ -1,3 +1,4 @@ | |||
// +build go1.9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to support Go 1.8 until Go 1.10 is released in Feb 2018
So we can either:
- Wait until Go 1.10 is release and we can drop Go 1.8 support and remove this build tag
- Or have a separate implementation of postgres.go which supports Go 1.8. See net/context for an example of a package supporting multiple Go versions
I will perhaps remake this PR myself with another file for 1.9. This is not my branch so I am actually unsure how to resolve the conflicts anyways. I will incorporate your request to rename |
Fixed in release v3.2.0 |
Hello @dhui , I would also like this one if possible merged in.
Thanks!