How long will a 64 bit Transaction-ID last in PostgreSQL?
To limit this problem, PostgreSQL has a number mechanism in place:
PostgreSQL splits transaction ids into half: 2 billion in the past are visible, 2 billion in the future are not visible – all visible rows must live in the 2 billion in the past, at all times. 64 bit transaction ids is an insanely large number:
fosdem=# SELECT 2::NUMERIC^64::NUMERIC;
? row)Since I want to know the time which the 64 bit transaction ids will last, I not only need to divide by 1M (10^6), but also by 2 – because PostgreSQL splits transaction ids into the visible and invisible part.
Source: andreas.scherbaum.la