Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pZwYg-0008W8-AP for pgsql-bugs@arkaria.postgresql.org; Wed, 08 Mar 2023 16:22:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pZwYf-0002G7-1l for pgsql-bugs@arkaria.postgresql.org; Wed, 08 Mar 2023 16:22:29 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pZwYe-0002FR-Pb for pgsql-bugs@lists.postgresql.org; Wed, 08 Mar 2023 16:22:28 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pZwYY-0002WJ-Am for pgsql-bugs@lists.postgresql.org; Wed, 08 Mar 2023 16:22:27 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 328GMJhM194320; Wed, 8 Mar 2023 11:22:19 -0500 From: Tom Lane To: akschoenberger@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17824: PQTRANS_ACTIVE misleading In-reply-to: <17824-c7bd094991e5f1c5@postgresql.org> References: <17824-c7bd094991e5f1c5@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Wed, 08 Mar 2023 04:01:30 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <194318.1678292539.1@sss.pgh.pa.us> Date: Wed, 08 Mar 2023 11:22:19 -0500 Message-ID: <194319.1678292539@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > The documentation for PQTRANS_ACTIVE [1] does not make explicitly clear that > it is returned in *all* cases where there is a command in progress on an > okay connection, and not just in the case that there is a command in > progress inside of a transaction [2]. With a name like PQTRANS_ACTIVE, I > believe it is worth making clear that it can happen when a transaction is > not active. The existing documentation defines it as "a command is in progress", which seems perfectly clear to me --- adding more words would just muddy the waters. Also, if a command is running then the server *does* have a transaction open -- it might be an auto-started, auto-committed one, but there's always a transaction. You seem to be using that word in a way that does not correspond with common Postgres usage. (Note that the definitions for PQTRANS_INTRANS and PQTRANS_INERROR say "transaction block" not "transaction", to comport with our usual terminology.) regards, tom lane