Re: BUG #17824: PQTRANS_ACTIVE misleading - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #17824: PQTRANS_ACTIVE misleading
Date
Msg-id 194319.1678292539@sss.pgh.pa.us
Whole thread Raw
In response to BUG #17824: PQTRANS_ACTIVE misleading  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> 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



pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: BUG #17824: PQTRANS_ACTIVE misleading
Next
From: Alexander Lakhin
Date:
Subject: Re: BUG #17368: Assert failed in GetSafeSnapshot() for SERIALIZABLE READ ONLY DEFERRABLE transaction