-
Notifications
You must be signed in to change notification settings - Fork 861
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
fix stmtcache invalidation #865
Conversation
I think it would be possible to call Also, I think you could use a replace directive in |
e24cfe4
to
d4a5199
Compare
Good idea, I've done that and it works great. (I've updated the most recent patch so you can still review it all as one diff and ignore my big re-targeting diff). I did have to add a backreference to the connection the rows was spawned from though.
That's a good idea. I'll keep it in mind for next time! |
Just noticed that rows.Next calls rows.Close on error, so we should be covered there as well! |
This should be ready once it is pointed back at |
d4a5199
to
8347332
Compare
This patch fixes jackc#841. The meat of the fix lives in [a PR to the pgconn repo][1]. This change just checks for errors after executing a prepared statement and informs the underlying stmtcache about them so that it can properly clean up. We don't try to get fancy with retries or anything like that, just return the error and allow the application to handle it. I had to make [some][1] [changes][2] to to the jackc/pgconn package as well as this package. Fixes jackc#841 [1]: jackc/pgconn#56 [2]: jackc/pgconn#55
8347332
to
1df45d7
Compare
@jackc I think this should be good to go now. |
Thanks! |
🎉 |
This patch fixes #841. The meat of the fix lives
in a PR to the pgconn repo. This change just checks
for errors after executing a prepared statement and informs
the underlying stmtcache about them so that it can properly
clean up. We don't try to get fancy with retries or anything
like that, just return the error and allow the application to handle it.
I had to make some changes to to the jackc/pgconn package as well
as this package, so I've retargeted this this repo on
ethanpailes/pgconn for the time being. This PR is not really in a
mergable state until those PRs merge and I rip out the retargeting
commit, but I would say it is ready for review (just review the most recent commit).
Fixes #841