Re: BUG #17824: PQTRANS_ACTIVE misleading

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #17824: PQTRANS_ACTIVE misleading
Дата
Msg-id 194319.1678292539@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #17824: PQTRANS_ACTIVE misleading  (PG Bug reporting form <noreply@postgresql.org>)
Список 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 по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: BUG #17824: PQTRANS_ACTIVE misleading
Следующее
От: Alexander Lakhin
Дата:
Сообщение: Re: BUG #17368: Assert failed in GetSafeSnapshot() for SERIALIZABLE READ ONLY DEFERRABLE transaction