Re: equivalent of @@TRANCOUNT PostgreSQL

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: equivalent of @@TRANCOUNT PostgreSQL
Дата
Msg-id 2045346.1622299864@sss.pgh.pa.us
обсуждение исходный текст
Ответ на RE: equivalent of @@TRANCOUNT PostgreSQL  (<dave@davebolt.co.uk>)
Список pgsql-admin
<dave@davebolt.co.uk> writes:
> @@TRANCOUNT: Transaction count.
> How many transactions are open at the moment.
> I’m not seeing anything that looks appropriate. As far as I can see it might be possible to do something using the
StatisticsCollector, see https://www.postgresql.org/docs/13/monitoring-stats.html 

Yeah, something like this should do for that:

select count(*) from pg_stat_activity where state is not null;

            regards, tom lane



В списке pgsql-admin по дате отправления:

Предыдущее
От: MichaelDBA
Дата:
Сообщение: Re: equivalent of @@TRANCOUNT PostgreSQL
Следующее
От: Tom Lane
Дата:
Сообщение: Re: equivalent of @@TRANCOUNT PostgreSQL