On Fri, Dec 16, 2022, at 5:40 PM, Jaime Casanova wrote:
> I want to hijack this thread to say that xact_commit seems to be also
> counting COMMIT records received by logical replication.
> Should we explain that in documentation?
Probably. I don't think adding something to pg_stat_database is appropriate.
IMO this concept should be explained in the logical replication chapter [1].
Logical replication uses transaction infrastructure to apply changes, hence,
statistics will take it into account.

> What about physical replication? Are those also counted?
No. Physical replication does not use the transaction machinery to replicate
changes. It is in a lower layer and statistics don't apply at it.


[1] https://www.postgresql.org/docs/devel/logical-replication.html


--
Euler Taveira
EDB   https://www.enterprisedb.com/

Reply via email to