Skip to content
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: autosave=conservative does not cover XX000 cache lookup failed for function #1788

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

radist-nt
Copy link

In come rare cases PostgreSQL backend could return error XX000 cache lookup failed for function .
This error not reproduced after rolling back to savepoint just before query, so autosave=conservative could fix it.

Closes #1786

All Submissions:

  • [+] Have you followed the guidelines in our Contributing document?
  • [+] Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Changes to Existing Features:

  • [-] Does this break existing behaviour? If so please explain.
  • [+] Have you added an explanation of what your changes do and why you'd like us to include them?
  • [-] Have you written new tests for your core changes, as applicable?
  • [*] Have you successfully run tests with your changes locally?
    2471 tests completed, 61 failed, 77 skipped, the same result before and after changes.
    AutoRollbackTestSuite is not present in testing logs and I didn't managed to run it.

…or function

In come rare cases PostgreSQL backend could return error XX000 cache lookup failed for function <oid>.
This error not reproduced after rolling back to savepoint just before query, so autosave=conservative could fix it.

Closes pgjdbc#1786
…or ...

In come rare cases PostgreSQL backend could return error XX000 cache lookup failed for <object> <oid>.
We've reproduced such errors for functions and types, so seems like, but actually, lsyscache.c and clauses.c contains such messages for another objects.
This error not reproduced after rolling back to savepoint just before query, so autosave=conservative could fix it.

Closes pgjdbc#1786
@radist-nt
Copy link
Author

It would be really good if we could get some tests for this.

Could you direct me to the information about testing system? I can provide a test case which will works for several versions, but it will not work with PostgreSQL 12 (because a root problem did not reproduced for this version). So the test case will not be applicable for PostgreSQL 12.

@vlsi
Copy link
Member

vlsi commented Jul 12, 2020

I can provide a test case which will works for several versions, but it will not work with PostgreSQL 12 (because a root problem did not reproduced for this version)

That is ok.

Here's a test that verifies autosave feature: https://github.com/pgjdbc/pgjdbc/blob/14576f4bca3a2484fd4f81a0d8276ae5cab9a419/pgjdbc/src/test/java/org/postgresql/test/jdbc2/AutoRollbackTestSuite.java
Could you add xx0000 failmode there?

@radist-nt
Copy link
Author

Yes, I'll try to work for it in a couple of weeks (I won't be able to focus on this before).
Thanks for a help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

XX000 (cache lookup failed for function) not covered by autosave=conservative
3 participants