Re: pg_stat_database.xact_commit + pg_stat_database.xact_rollback as a reliable metric for xid consumption ?

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

 




> On Jun 1, 2020, at 2:16 PM, Achilleas Mantzios <achill@xxxxxxxxxxxxxxxxxxxxx> wrote:
> 
>> 
>> coalesce(txid_current_if_assigned(), txid_snapshot_xmax(txid_current_snapshot())) as xact_txid, …
> if this is in the same system, and this _hist table only gets inserts, selects/delets, why not just use xmin ? Also since you are inserting how can you have null  txid_current_if_assigned()?
>> 
>> 
>> 

Because when exporting the data it’s a readonly transaction and current_txid will be null.  I normally use export on the primary and replicas which can’t do inserts.  I create the hist_ tables and insert locally for a standalone instance.





[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