adjusted to shared_ptr in the postgres-multiplexer.