# v0.1.1 — Change Capture Correctness Fixes

> **Full technical details:** [v0.1.x.md-full.md](v0.1.x.md-full.md)

**Status: ✅ Released** | **Scope: Patch**

> Critical correctness fixes for the WAL-based change capture path,
> discovered after the v0.1.0 launch.

---

## What problem does this solve?

After shipping v0.1.0, real-world testing revealed three edge cases in the
WAL decoder change-capture path that could cause incorrect results for
specific table configurations. These are correctness bugs — not performance
or usability issues — and they were fixed as a priority patch release.

---

## WAL Decoder: Keyless Tables

The WAL-based change decoder computes a hash to identify each row (a
*primary key hash*). For tables without a primary key, the hash was computed
incorrectly, causing the decoder to lose track of which rows were updated or
deleted.

*In plain terms:* if you used pg_trickle on a table with no primary key, the
change tracking could silently produce wrong results. This is now fixed.

---

## UPDATE Change Representation

When a row is updated, pg_trickle needs to know both the *old* value (to
remove it from the stream table result) and the *new* value (to add the
updated result). The WAL decoder was not correctly capturing the old column
values in all cases.

This fix ensures that `UPDATE` operations are fully represented in the change
buffer, which is essential for differential refresh to work correctly.

---

## Removal of the Delete+Insert Strategy

An early implementation strategy that replaced UPDATE handling with
DELETE+INSERT pairs was found to cause subtle duplication issues. This
strategy was removed; the cleaner approach it was meant to work around has
been handled properly.

---

## Scope

v0.1.1 is a focused correctness patch. No new features were added. If you
use WAL-based change capture, upgrade is recommended.
