Understanding how visibility computation is implemented in the server is helpful both to help predict how statements will act, and so that you can interpret the diagnostic information available.
As transactions are created in the database, PostgreSQL advances a transaction ID counter, usually just called the XID, to keep track of them. When you insert a row into the database, or update an existing row, the new row created by that operation saves the session's transaction ID into a field named the insertion XID, also referred to as the xmin. This is the minimum XID capable of seeing this bit of information, once it's been committed:
When a query or statement starts (tracking at either granularity can happen, ...