method

dealloc

Importance_0
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: StatementPool
dealloc(key) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 309
          def dealloc(key)
            # This is ugly, but safe: the statement pool is only
            # accessed while holding the connection's lock. (And we
            # don't need the complication of with_raw_connection because
            # a reconnect would invalidate the entire statement pool.)
            if conn = @connection.instance_variable_get(:@raw_connection)
              conn.query "DEALLOCATE #{key}" if conn.status == PG::CONNECTION_OK
            end
          rescue PG::Error
          end
Register or log in to add new notes.