-
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
PostgreSQL < 9.3 does not respect a new search_path for prepared statements #449
PostgreSQL < 9.3 does not respect a new search_path for prepared statements #449
Conversation
to connect server on docker container.
capybara (the development dependency) depends on xpath, and xpath depends on nokogiri.
love love love this ❤️. thanks so much for doing the digging. any ideas on the jruby fails? |
No 😩 I'm not familiar with JRuby. |
Exclude Rails (>= 5.0) with JRuby, because of the activerecord-jdbc-adapter is unstable for Rails 5.x.
I figured out 🎉 And the another problem is activerecord-jdbc-adapter, not apartment. |
✅ test passed |
yayyyy 💃 |
Thanks 🎉 |
@mikecmpbll
I finally straighten out the failing spec with PostgreSQL + Rails 5.0 + Apartment that I described in #448.
The issue is caused by older PostgreSQL version (< 9.3). That version of PostgreSQL behaves a supprising behavior (as official document described in E.18.2.2. Other) for the cached statements.
And the
PREPARE
statement documentation is here: https://www.postgresql.org/docs/9.3/static/sql-prepare.htmlRemarkable point:
So, clearing the cache of prepared statements for the older version of PostgreSQL is to solve the problem about the tests.
You can confirm what the statements are cached in the specs by adding the lines below.
The query for the
ar_internal_metadata
are cached and executed for a removed schema under PostgreSQL 9.1 (default version for the Travis-CI), so the test is failed withPG::UndefinedTable: ERROR: relation "ar_internal_metadata" does not exist at character 39
.And I fixed some rarely (occasionally?) failing spec.