Skip to main content

serve

Function serve 

Source
pub async fn serve<C, F>(
    listener: TcpListener,
    catalog: Arc<C>,
    config: PgWireConfig,
    shutdown: F,
) -> Result<()>
where C: DbCatalog, F: Future<Output = ()>,
Expand description

Serves the PostgreSQL wire protocol until shutdown resolves.

Each accepted connection is handled on its own task; per-connection failures are logged and do not stop the server.

ยงErrors

Returns an error only if accepting a connection fails fatally.