package postgres_async

  1. Overview
  2. Docs
type backend_key = {
  1. pid : int;
    (*

    The type of pid is intentionally int instead of Core.Pid.t.

    When the client is connected directly to a database cluster this field is expected to be a Linux PID, in which case the assumptions in internal validation of Core.Pid are valid: in particular, that a PID must be a positive number.

    In the case that a client is connected to a pgbouncer proxy the PID supplied (and tracked) by the proxy is random. This is done to allow cancel requests per proxied client.

    The postgres protocol spec states that this field is "Int32: The process ID of this backend", so it's a little unclear as to whether or not pgbouncer's behaviour is a violation of the spec. In any case, it is what it is, and this field is an int rather than a Pid.t in order to support connecting via pgbouncer.

    This may also be true of other proxies or similar software.

    *)
  2. secret : int;
}
val sexp_of_backend_key : backend_key -> Sexplib0.Sexp.t
module type Named_or_unnamed = sig ... end
module Notification_channel : sig ... end
OCaml

Innovation. Community. Security.