Uploaded image for project: 'Agroal'
  1. Agroal
  2. AG-236

Terminate read-only connections after DB failover

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • None
    • None
    • False
    • Hide

      None

      Show
      None
    • False

      After a failover of an instance, a connection to an instance might become read-only, and then issue 25006 SQL errors on a PostgreSQL instance. 

      This has been described in https://github.com/keycloak/keycloak/issues/24493. 

      While I think the better option is to have validation query, as it would prevent an error from happening in the first place, I wonder if checking for SQL Code in 25006 in PostgreSQLExceptionSorter could be added as well to clean up after the fact. 

      I briefly had the idea of asking the connection if is marked with isReadOnly(), but I found that the connection is inaccessible in the ExceptionSorter. 

       

              lbarreiro-1 Luis Barreiro
              aschwart@redhat.com Alexander Schwartz
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: