News for hackers. Stuff that matters.
Re:The Internals of PostgreSQL by senderista on Thursday November 05, 2026 @12:22PM (#50381748)
The time-split B-tree is designed to make time-travel queries efficient in both time and space. That is not a trivial problem.
Re:The Internals of PostgreSQL by mike_hearn on Friday November 06, 2026 @03:45AM (#50389761)
Hah, interesting. I need to investigate that data structure. I don't know if Flashback uses it either - if you enable the time travel feature then undo logs are processed into internal tables partitioned by SCN, but I suppose it's possible those tables are stored in a different way to regular heap-organized or index-organized tables.
Re:The Internals of PostgreSQL by senderista on Friday November 06, 2026 @02:03PM (#50396794)
The nodes in a time-split B-tree tile the 2-D time/primary-key space in an arbitrary way except they must cover it fully with no overlaps (think of each node as an arbitrary rectangle with primary key as one axis and time as the other). That gives you a lot of freedom in how you partition the space, allowing you to exploit local sparsity in either the time distribution or the primary key distribution.
Re:The Internals of PostgreSQL by mike_hearn on Saturday November 07, 2026 @01:24PM (#50406744)
Thanks, that's interesting!