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

From: Rui DeSousa <rui(at)crazybean(dot)net>
To: Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
Cc: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: pg_stat_database.xact_commit + pg_stat_database.xact_rollback as a reliable metric for xid consumption ?
Date: 2020-06-01 18:22:43
Message-ID: FD31C3C1-C1A3-4D93-9971-A45E9B5B5D1D@crazybean.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> On Jun 1, 2020, at 2:16 PM, Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com> 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.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message vinod kale 2020-06-02 14:19:47 Block corruption Error.
Previous Message Achilleas Mantzios 2020-06-01 18:16:43 Re: pg_stat_database.xact_commit + pg_stat_database.xact_rollback as a reliable metric for xid consumption ?