From 8b4d3ac965a3f122c2af8f6c9ed9fe500586add7 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Fri, 23 Aug 2019 08:47:50 +0300 Subject: [PATCH] Added a note about undefined behavior of get_backend_pid when connecting to PgBouncer. --- doc/src/connection.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/src/connection.rst b/doc/src/connection.rst index 76f1332c..75dc6065 100644 --- a/doc/src/connection.rst +++ b/doc/src/connection.rst @@ -117,8 +117,6 @@ The ``connection`` class with a `~connection.commit()`/`~connection.rollback()` before closing. - .. _PgBouncer: http://pgbouncer.projects.postgresql.org/ - .. index:: single: Exceptions; In the connection class @@ -828,6 +826,9 @@ The ``connection`` class Note that the PID belongs to a process executing on the database server host, not the local host! + .. warning:: Behaviour of the ``get_backend_pid`` is undefined when + connecting to some sort of proxy, like PgBouncer_. + .. seealso:: libpq docs for `PQbackendPID()`__ for details. .. __: https://www.postgresql.org/docs/current/static/libpq-status.html#LIBPQ-PQBACKENDPID @@ -889,3 +890,6 @@ The ``connection`` class :hide: conn.rollback() + +.. _PgBouncer: http://pgbouncer.projects.postgresql.org/ +