-
Notifications
You must be signed in to change notification settings - Fork 460
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 create for libpq 9.6 and older db #418
Fix create for libpq 9.6 and older db #418
Conversation
These changes break in rails 5. Can you look? |
There are other PRs with unrelated changes that fail on the same tests, so I don't think the problems are caused by my changes. If I have a chance to investigate further, I'll try and help. |
The reason which breaks Rails 5.0 tests is solved in #449. |
When Postgres library (libpq) 9.6 is installed on the server, `pg_dump` adds an SQL command to SET `idle_in_transaction_session_timeout`, which is new to 9.6, so it fails when running against older versions of the Postgres database. I've added the parameter to the blacklist.
3174b18
to
4bfc69a
Compare
i don't really know much about pg. @meganemura — does this seem okay to you? if so, i'll merge :). |
I actually don't know much about pg either. Those statements in black list are ignored from dumped schema on cloning pg schema. |
@meganemura whups, my bad, thought you were a pg user :) @omergertel why would you ever be dumping with 9.6 and loading the dump into an older version? |
Not quite what happens. This blocks the tenant creation if the client ( In our case, we've found out that Heroku have updated the client library to 9.6 in all of their images, and we were still running the database on 9.5. That's mostly ok because Generally, it isn't farfetched to have a server running a client library different than the version of the database (as database upgrades are much more difficult and less frequent than, say, running This is the same reasoning behind the |
the essence of the issue then is using incompatible versions of the client and server libraries :/. not sure why we'd do anything about that in apartment but seeing as, as you correctly pointed out, we already are, i'll merge.. |
Thank you! |
When Postgres library (libpq) 9.6 is installed on the server, `pg_dump` adds an SQL command to SET `idle_in_transaction_session_timeout`, which is new to 9.6, so it fails when running against older versions of the Postgres database. I've added the parameter to the blacklist.
When Postgres library (libpq) 9.6 is installed on the server,
pg_dump
adds an SQL command to SETidle_in_transaction_session_timeout
, which is new to 9.6, so it fails when running against older versions of the Postgres database.I've added the parameter to the blacklist.
Is this acceptable?