module CQL::Postgres::Transport

Overview

Opens the byte stream to the server: TCP or Unix socket, optionally upgraded to TLS through the protocol's SSLRequest. Each blocking step of connecting and starting up is bounded by connect_timeout; call .relax once the session is up.

Defined in:

postgres/transport.cr

Class Method Summary

Class Method Detail

def self.cancel(config : Config, process_id : Int32, secret_key : Bytes, wait : Time::Span) : Nil #

Sends an out-of-band CancelRequest for the session identified by the key. The request itself is never encrypted, as in libpq before version 17. Returns once the postmaster has hung up, which it does after signalling the backend. Connecting and waiting for that are each capped at wait (a proxy may accept and sit).


[View source]
def self.connect(config : Config) : IO #

[View source]
def self.open_stream(config : Config) : Stream #

[View source]
def self.relax(io : IO) : Nil #

Lifts the startup time limits so queries may run as long as they need.


[View source]