diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,10 @@
 # Revision history for ipedb
 
+## 0.2.0.1 -- 2026-07-16
+
+- Fix issue where the `indexer` does not stop until the entire eventlog has been processed,
+  rather than immediately after the relevant section.
+
 ## 0.2.0.0 -- 2026-07-02
 
 This version is a complete reimplementation of the `ipedb` tool and library and adds the new `ccdb` tool.
diff --git a/ipedb.cabal b/ipedb.cabal
--- a/ipedb.cabal
+++ b/ipedb.cabal
@@ -1,6 +1,6 @@
 cabal-version: 3.0
 name: ipedb
-version: 0.2.0.0
+version: 0.2.0.1
 synopsis: Build databases with IPE data
 description: Build databases with IPE data.
 homepage: https://github.com/well-typed/ipedb#README
diff --git a/src/IpeDB/Database.hs b/src/IpeDB/Database.hs
--- a/src/IpeDB/Database.hs
+++ b/src/IpeDB/Database.hs
@@ -64,7 +64,7 @@
 import Data.Default (Default (..))
 import Data.Machine ((~>))
 import Data.Machine qualified as M
-import Data.Maybe (fromJust, fromMaybe)
+import Data.Maybe (fromJust, fromMaybe, isNothing)
 import Data.Text qualified as T
 import Data.Vector (Vector)
 import Data.Vector qualified as V
@@ -390,16 +390,22 @@
 
 {- |
 Index data from a GHC event stream.
+
+__Warning:__ This machine assumes that all events for which the extraction
+function returns @Just@ are consecutive. This is true for cost centre and
+info table provenance declarations in the GHC eventlog.
 -}
 indexer ::
   (Key k, Value v) =>
+  -- | The function that extracts key–value data from the event stream.
   (e -> Maybe (k, v)) ->
   IndexerOptions ->
   Table k v ->
   M.ProcessT IO e Void
 indexer extractKV options table =
   M.mapping extractKV
-    ~> M.asParts
+    ~> M.droppingWhile isNothing
+    ~> M.takingJusts
     ~> M.buffered (fromIntegral options.indexerBufferSize)
     ~> M.mapping V.fromList
     ~> M.repeatedly (M.await >>= liftIO . inserts table)
