From: Daniele Varrazzo Date: Wed, 8 Jun 2022 00:34:35 +0000 (+0200) Subject: docs(crdb): include changes in CRDB 22.1 X-Git-Tag: 3.1~49^2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54cf80c894d7add28d7f7b46be01dd7132da0fec;p=thirdparty%2Fpsycopg.git docs(crdb): include changes in CRDB 22.1 --- diff --git a/docs/api/crdb.rst b/docs/api/crdb.rst index 4d11614e0..d0aa1f261 100644 --- a/docs/api/crdb.rst +++ b/docs/api/crdb.rst @@ -28,21 +28,26 @@ affecting Psycopg behaviour: .. __: https://www.cockroachlabs.com/docs/stable/postgresql-compatibility.html +- `~psycopg.Connection.cancel()` doesn't work before CockroachDB 22.1. On + older versions, you can use `CANCEL QUERY`_ instead (but from a different + connection). + +- `~psycopg.ConnectionInfo.backend_pid` is only populated from CockroachDB + 22.1. Note however that you cannot use the PID to terminate the session; use + `SHOW session_id`_ to find the id of a session, which you may terminate with + `CANCEL SESSION`_ in lieu of PostgreSQL's :sql:`pg_terminate_backend()`. -- `~psycopg.Connection.cancel()` doesn't work. You can use `CANCEL QUERY`_ - instead (from a different connection). TODOCRDB: possibly supported in 22.1. -- `~psycopg.ConnectionInfo.backend_pid` doesn't return useful info. You can - use `SHOW SESSIONS`_ to find a session id which you may use with `CANCEL - SESSION`_ in lieu of PostgreSQL's :sql:`pg_terminate_backend()`. - Several data types are missing or slightly different from PostgreSQL (see `adapters` for an overview of the differences). + - The :ref:`two-phase commit protocol ` is not supported. + - :sql:`LISTEN` and :sql:`NOTIFY` are not supported. However the `CHANGEFEED`_ command, in conjunction with `~psycopg.Cursor.stream()`, can provide push notifications. .. _CANCEL QUERY: https://www.cockroachlabs.com/docs/stable/cancel-query.html -.. _SHOW SESSIONS: https://www.cockroachlabs.com/docs/stable/show-sessions.html +.. _SHOW session_id: https://www.cockroachlabs.com/docs/stable/show-vars.html .. _CANCEL SESSION: https://www.cockroachlabs.com/docs/stable/cancel-session.html .. _CHANGEFEED: https://www.cockroachlabs.com/docs/stable/changefeed-for.html