> 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.