Where is the source code of the Postgres txid_current function? Where is the source code of the Postgres txid_current function? (docs)
I want to read the function to better understand how it handles values bigger than (2^64)/2.
include/catalog/pg_proc.dat maps txid_current to src/backend/utils/adt/xid8funcs.c:pg_current_xact_id which leads the majority of the implementation in GetTopFullTransactionId and deeper it goes, but easy to follow.