<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/backfilling-postgres-toast-columns-in-debezium-data-change-events-4rnl6p89z" -->

---
title: Backfilling Postgres TOAST Columns in Debezium Data...
description: Postgres logical replication omits unchanged TOAST column values in CDC events for tables without replica identity FULL, causing downstream consumers to...
canonical: https://daily.dev/posts/backfilling-postgres-toast-columns-in-debezium-data-change-events-4rnl6p89z
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Backfilling Postgres TOAST Columns in Debezium Data Change Events | daily.dev
og:description: Postgres logical replication omits unchanged TOAST column values in CDC events for tables without replica identity FULL, causing downstream consumers to...
og:url: https://daily.dev/posts/backfilling-postgres-toast-columns-in-debezium-data-change-events-4rnl6p89z
og:image: https://api.daily.dev/og/posts/4Rnl6p89Z.png
og:image:alt: Backfilling Postgres TOAST Columns in Debezium Data Change Events
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Backfilling Postgres TOAST Columns in Debezium Data Change Events

**[Gunnar Morling](https://daily.dev/sources/gunnar-morling)** · 16 min read · 0 upvotes · 0 comments

## Summary

Postgres logical replication omits unchanged TOAST column values in CDC events for tables without replica identity FULL, causing downstream consumers to receive incomplete row state. Three solutions are explored: Debezium's built-in reselect post processor (simple but prone to data races and source DB load), Apache Flink DataStream API with a KeyedProcessFunction managing per-record state, and Flink SQL using OVER aggregation or the upcoming Process Table Functions (PTFs) in Flink 2.1. PTFs offer the best balance—SQL simplicity with imperative state control, precise state lifecycle management tied to delete events, and reusable encapsulation. A future Debezium-native solution using embedded RocksDB or SlateDB state is also proposed.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.morling.dev/blog/backfilling-postgres-toast-columns-debezium-change-events/>

---

Tags: [#postgresql](https://daily.dev/tags/postgresql), [#apache-flink](https://daily.dev/tags/apache-flink), [#debezium](https://daily.dev/tags/debezium), [#change-data-capture](https://daily.dev/tags/change-data-capture)

[View this post on daily.dev](https://daily.dev/posts/backfilling-postgres-toast-columns-in-debezium-data-change-events-4rnl6p89z)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Backfilling Postgres TOAST Columns in Debezium Data Change Events","url":"https://daily.dev/posts/backfilling-postgres-toast-columns-in-debezium-data-change-events-4rnl6p89z","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/backfilling-postgres-toast-columns-in-debezium-data-change-events-4rnl6p89z"},"datePublished":"2026-03-16T08:14:51.324Z","dateModified":"2026-03-16T08:29:37.051Z","description":"Postgres logical replication omits unchanged TOAST column values in CDC events for tables without replica identity FULL, causing downstream consumers to...","image":"https://media.daily.dev/image/upload/s--foaA6JGU--/f_auto/v1722860399/public/Placeholder%2004","thumbnailUrl":"https://media.daily.dev/image/upload/s--foaA6JGU--/f_auto/v1722860399/public/Placeholder%2004","isAccessibleForFree":true,"articleSection":"Gunnar Morling","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Gunnar Morling","logo":"https://media.daily.dev/image/upload/s--77UJH_xq--/f_auto,q_auto/v1773648773/logos/gunnar-morling?_a=BAMAMiiu0","url":"https://daily.dev/sources/gunnar-morling"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/backfilling-postgres-toast-columns-in-debezium-data-change-events-4rnl6p89z","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"postgresql,apache-flink,debezium,change-data-capture","timeRequired":"PT16M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Gunnar Morling","item":"https://daily.dev/sources/gunnar-morling"},{"@type":"ListItem","position":3,"name":"Backfilling Postgres TOAST Columns in Debezium Data Change Events"}]}
```

