A savepoint has its own xid
Rows written after SAVEPOINT carry the subtransaction's xid in xmin, not the top-level one.
task
In one transaction insert id 1, SAVEPOINT a, insert id 2, commit. Return count(DISTINCT xmin::text) over both rows.
Run a query to see rows here.
Run EXPLAIN on the statement under the cursor: Plan tab, button Explain.
No tables yet.
Rows written after SAVEPOINT carry the subtransaction's xid in xmin, not the top-level one.
In one transaction insert id 1, SAVEPOINT a, insert id 2, commit. Return count(DISTINCT xmin::text) over both rows.