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

Поиск
Список
Период
Сортировка
От Rui DeSousa
Тема Re: pg_stat_database.xact_commit + pg_stat_database.xact_rollback asa reliable metric for xid consumption ?
Дата
Msg-id FD31C3C1-C1A3-4D93-9971-A45E9B5B5D1D@crazybean.net
обсуждение исходный текст
Ответ на Re: pg_stat_database.xact_commit + pg_stat_database.xact_rollback asa reliable metric for xid consumption ?  (Achilleas Mantzios <achill@matrix.gatewaynet.com>)
Список pgsql-admin

> On Jun 1, 2020, at 2:16 PM, Achilleas Mantzios <achill@matrix.gatewaynet.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
sinceyou 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
theprimary and replicas which can’t do inserts.  I create the hist_ tables and insert locally for a standalone
instance.


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

Предыдущее
От: Achilleas Mantzios
Дата:
Сообщение: Re: pg_stat_database.xact_commit + pg_stat_database.xact_rollback asa reliable metric for xid consumption ?
Следующее
От: vinod kale
Дата:
Сообщение: Block corruption Error.