How to do it...

PostgreSQL uses internal transaction identifiers that are 4 bytes long, so we only have 2^32 transaction IDs (about 4 billion). PostgreSQL starts again from the beginning when that wraps around, allocating new identifiers in a circular manner. The reason we do this is that moving to an 8-byte identifier has various other negative effects and costs that we would rather not pay, so we keep the 4-byte transaction identifier, which means we need to do regular sweeps to replace old transaction identifiers with a special value that is not interpreted in a circular way, and is called Frozen Transaction ID; that's why this procedure is known as freezing.

There are two routes that a row can take in PostgreSQL: a row version dies and ...

Get PostgreSQL Administration Cookbook, 9.5/9.6 Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.