Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 01 · Database Internals · One Database, to the Bolt · about 17 min to read

Play it as a journeyTutor comes with a plan

What changed in Postgres 17 and 18

B-Tree on Disk
B-Tree on Disk · Open board

You have a Postgres database that works. Someone on your team says: “Upgrade to 18. It is faster.” You ask the fair question: faster at what, and by how much? Most changes in a new version never touch your tables. Three of them might.

Postgres 17 came out on 26 September 2024. Postgres 18 came out on 25 September 2025. This lesson takes three changes from those two releases: reading many pages at once, using an index without its first column, and ids that start with the time. For each one it says which earlier number in this chapter moves, and which does not. I re-ran the chapter’s bench on 16, 17 and 18 to find out.

By the end you will be able to say, for your own database, which of the three changes is worth an upgrade, and prove it with one query each.

The history (optional)

Andres Freund committed the core of Postgres’s asynchronous I/O on 17 March 2025, and the io_uring method ten days later, on 27 March 2025. The uuidv7() function was written by Andrey Borodin and committed by Masahiko Sawada on 11 December 2024. It missed the Postgres 17 deadline, so it shipped in 18. The release notes credit Peter Geoghegan for skip scan.

Before you start. The sentence that says what gave you the bench: a users table with 100,000 rows and an accounts table with 106,667 rows, and the planner that picks how to answer a query. The Buffer Pool showed that read= in a plan means a page was not in Postgres’s memory, and hit= means it was. B-Tree on Disk showed that an index is a sorted tree of pages, 8 kB each, and that a new key must go to its sorted place.

Lesson 7 of 26 in Database Internals

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • Asynchronous I/O: asking the disk for many pages at once
  • Skip scan: using an index without its first column
  • UUIDv7: an id that starts with the time
  • What did not move: your earlier numbers
  • How I measured
  • The earlier numbers, side by side
  • Async I/O, in full
  • Skip scan, in full
  • UUIDv7, in full
  • The rest of what changed

Terms it explains: asynchronous I/O, effective_io_concurrency, skip scan, UUID, UUIDv7, Common mistakes.

Related papers

Review Database Internals