Re: equivalent of @@TRANCOUNT PostgreSQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



<dave@xxxxxxxxxxxxxx> 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 Statistics Collector, 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






[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux