Repository navigation
Conversation
|
Gauri seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
With preserve_toast_values on, a CDC stream on eq fails the sync instead of writing the placeholder.
Descriptions now match the spec: OLake reads unchanged TOAST column values from the Iceberg destination, not from an in-memory cache. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
| | Replication Slot `required for CDC` | Logical replication slot (pgoutput) that retains WAL segments until read, ensuring consistent CDC. | `olake-repl-slot` | | ||
| | Publication `required for CDC` | Name of the PostgreSQL publication that defines which tables and operations (INSERT, UPDATE, DELETE, TRUNCATE) to replicate. Must exist in the same database as the replication slot and include all tables for CDC capture. | `postgres_pub` | | ||
| | Initial Wait Time | Idle timeout for pgoutput log reading | `120` | | ||
| | Preserve TOAST Values | Keeps large column values (TOAST values) that Postgres leaves out of an update by reading them from the destination. Works only with Iceberg destinations whose update type is positional deletes (`pos`) or deletion vectors (`dv`). Off by default. | Off | |
There was a problem hiding this comment.
When an UPDATE operation leaves a TOAST column unchanged, Postgres omits it. OLake Go writes __olake_unavailable_value__ for that column. With the toggle ON, OLake Go reads that record's previous value from the Iceberg destination and writes that value instead, so the unchanged column still shows its last real value. Works only with the Iceberg Destination whose update type is positional deletes or deletion vectors.
Also make the example value Off -> Off (Default)
| | initial_wait_time `required for CDC` | Idle timeout for pgoutput log reading | `120` | INTEGER | | ||
| | replication_slot `required for CDC` | Logical replication slot (pgoutput) that retains WAL segments until read, ensuring consistent CDC. | `"olake-repl-slot"` | STRING | | ||
| | publication `required for CDC` | Name of the PostgreSQL publication that defines which tables and operations (INSERT, UPDATE, DELETE, TRUNCATE) to replicate. Must exist in the same database as the replication slot and include all tables for CDC capture. | `"postgres_pub"` | STRING | | ||
| | preserve_toast_values | Keeps large column values (TOAST values) that Postgres leaves out of an update by reading them from the destination. Iceberg destination with update type `pos` or `dv` only. Optional; default `false`. | `true` | BOOLEAN | |
There was a problem hiding this comment.
Same description change as mentioned above
| :::note[Preserve TOAST Values] | ||
| - **Set it when you create the source.** This option can only be changed while creating the source. Once a source or job exists, it can't be changed from the UI. | ||
| - **It limits the update types.** With this option on, Equality deletes (`eq`) is not offered. | ||
| ::: |
There was a problem hiding this comment.
- no need to mention about equality deletes again here as we have already mentioned in the table that it only works with positional and deletion vector
- For the other point we can directly inform:
This field can only be set while creating the source. Once the source or job exists, it can't be modified.
Also in the heading of note can be removed (just use :::note)
| :::warning[Choose this once] | ||
| Set `preserve_toast_values` before the first `discover` and keep it. Changing it might cause errors. | ||
| ::: |
There was a problem hiding this comment.
no need to add warning, we can add a note and mention:
This field can only be set before running the discover command. Changing it later might cause errors.
| | Setup | Large values kept? | | ||
| | ----- | ------------------ | | ||
| | Iceberg destination, update type `pos` or `dv`, CDC or Strict CDC | ✅ Yes | | ||
| | Iceberg destination, update type `eq` | ❌ No, placeholder written | | ||
| | Stream in append mode | ❌ No, placeholder written | | ||
| | Parquet / S3 destination | ❌ No, placeholder written | | ||
| | Full refresh / incremental / backfill | Not needed. These read whole rows | | ||
| | Table with `REPLICA IDENTITY FULL` | Not needed. Postgres already sends the value | | ||
| | `wal2json` plugin | ❌ Not supported (deprecated) | |
There was a problem hiding this comment.
since we have already mentioned above that it only works for iceberg positional and deletion, Iceberg destination part can be removed (as it is redundant), parquet s3 destination can also be removed. Also check once if any other parameter is also necessary to be mentioned here
| **Solution**: Use either of these: | ||
|
|
||
| **Solution**: To ensure TOAST column values are always included in the WAL output, run the following on the affected table: | ||
| - Turn on **Preserve TOAST Values** when creating the source (Iceberg destination with update type `pos` or `dv`). |
There was a problem hiding this comment.
Remove the iceberg requirement from here already mentioned above in the table
… section Remove emojis and add short inline reasons to each row. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
| | Preserve TOAST Values | When an UPDATE operation leaves a TOAST column unchanged, Postgres omits it. OLake Go writes **`__olake_unavailable_value__`** for that column. With the toggle **`ON`** , OLake Go reads that record's previous value from the Iceberg destination and writes that value instead, so the unchanged column still shows its last real value. Works only with the Iceberg Destination whose update type is positional deletes or deletion vectors. | Off (Default) | | ||
|
|
||
| :::note Preserve TOAST Values | ||
| This field can only be set while creating the source. Once the source or job exists, it can't be modified. |
There was a problem hiding this comment.
we should give reason here why it cannot be modified . user shud understand that changing this setting will cause data descrepencies
There was a problem hiding this comment.
Added -
Changing it later causes data discrepancies — existing records already hold either real values or __olake_unavailable_value__ depending on what was set at sync time.
| | initial_wait_time `required for CDC` | Idle timeout for pgoutput log reading | `120` | INTEGER | | ||
| | replication_slot `required for CDC` | Logical replication slot (pgoutput) that retains WAL segments until read, ensuring consistent CDC. | `"olake-repl-slot"` | STRING | | ||
| | publication `required for CDC` | Name of the PostgreSQL publication that defines which tables and operations (INSERT, UPDATE, DELETE, TRUNCATE) to replicate. Must exist in the same database as the replication slot and include all tables for CDC capture. | `"postgres_pub"` | STRING | | ||
| | preserve_toast_values | When an UPDATE operation leaves a TOAST column unchanged, Postgres omits it. OLake Go writes **`__olake_unavailable_value__`** for that column. With the value set as **`true`**, OLake Go reads that record's previous value from the Iceberg destination and writes that value instead, so the unchanged column still shows its last real value. Works only with the Iceberg Destination whose **`update_type`** is **`pos`** or **`dv`** in selected streams. | `false` | BOOLEAN | |
There was a problem hiding this comment.
what happens if in cli user will set preserve toast as true and update_type as eq ?
There was a problem hiding this comment.
Added -
Does not work with eq
| | ssh_config | Configure OLake Go to connect through an SSH tunnel. | `{"host": "my-tunnel-host", "port": 22 , "username": "my-tunnel-user", "password": "tunnel-password"}` | OBJECT | | ||
|
|
||
| :::note | ||
| Set `preserve_toast_values` before the first `discover` and leave unchanged. Changing it might cause errors. |
There was a problem hiding this comment.
this will be a part of the source.json right ? so for first time user it will anyway be before discover , but source.json is still editable he might still go and change that. what happens then?
| | Setup | Large values kept? | | ||
| | ----- | ------------------ | | ||
| | Only Iceberg destination and update type `pos` or `dv` | Yes — prior value read from destination | | ||
| | Sync Mode: CDC or Strict CDC | Yes — required to detect missing TOAST columns | |
There was a problem hiding this comment.
i dont think it is available in strict cdc ? Can you once chcek with vaibhav
There was a problem hiding this comment.
https://datazip.atlassian.net/wiki/spaces/olaketech/pages/800456707/Toast+documentation+updates
Vaibhav's documentation mentions that it is available under Strict CDC
| | `wal2json` plugin | Not supported (deprecated) | | ||
|
|
||
| :::info | ||
| Performance: with the option on, a sync may take longer when many updates leave large values unchanged, because each missing value is read from the destination. |
There was a problem hiding this comment.
"with the option on" : please write better english
| Performance: with the option on, a sync may take longer when many updates leave large values unchanged, because each missing value is read from the destination. | ||
| ::: | ||
|
|
||
| ### Do Not Switch It On or Off for an Existing Source or Job |
There was a problem hiding this comment.
also we are not allowing user to edit this setting
There was a problem hiding this comment.
we can't block user from turning it on/off in cli, this is explanation for that . in ui this option will be blocked once the source is created.
| **Solution**: To ensure TOAST column values are always included in the WAL output, run the following on the affected table: | ||
| - Turn on **Preserve TOAST Values** when creating the source. | ||
| - Run the following on the affected table. Postgres then sends the full row, at the cost of more WAL: | ||
|
|
There was a problem hiding this comment.
what happens if user upgrades the source version of a already created source ? the toast value toggle will still be OFF , so then assume if user wants to enable this setting what he needs to do ? we need to mention this as a seperate block or something.
…fter creation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…lues section Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… update type Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ata discrepancies Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
| :::note | ||
| Set `preserve_toast_values` before the first `discover` and leave unchanged. Changing it causes data discrepancies. | ||
| ::: | ||
|
|
There was a problem hiding this comment.
Source.json is editable
If changed after syncs have run, data becomes inconsistent — rows synced with it off hold olake_unavailable_value, rows synced with it on hold real values.
Updated the note to say "causes data discrepancies" instead of "might cause errors"

Documents Postgres preserve_toast_values, introduced in olake#1264.
source.jsonexamplepos/dvCDC modes & limitationsREPLICA IDENTITY FULLBoth MDX files compile. Merge after olake#1264 ships.