Postgresql exposes the view pg_stat_activity
. As per the documentation,
backend_xid
means Top-level transaction identifier of this backend, if any.
backend_xmin
means The current backend's xmin horizon.
Let us take an example:
BEGIN;
# INSERT Statement1
# INSERT Statement2
COMMIT;
backend_xid
represents the transaction identifier allotted to the full transaction while if pg_stat_activity
shows the statement2 in its row, then backend_xmin
corresponds to the xmin
for statement2.
Is the understanding correct?