Where is the source code of the Postgres txid_current function?
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.