Skip to content

Commit bc2e68d

Browse files
authored
docs: Update postgres docs with info to retain full row (#422)
* show records with op_type d * updated the line in the node
1 parent c2b24d0 commit bc2e68d

5 files changed

Lines changed: 36 additions & 0 deletions

File tree

docs/connectors/postgres/setup/aurora.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,14 @@ ALTER PUBLICATION olake_publication ADD TABLE test_table;
199199
INSERT INTO test_table (data) VALUES ('PostgreSQL pgoutput CDC test - INSERT');
200200
```
201201

202+
:::note Delete records and full row values
203+
By default, WAL only includes the primary key on deletes. In OLake, delete records (`_op_type = 'd'`) will therefore only retain the primary key and OLake metadata columns — other columns appear blank or null. To retain the full deleted row run the following query:
204+
205+
```sql
206+
ALTER TABLE test_table REPLICA IDENTITY FULL;
207+
```
208+
:::
209+
202210
**Check for changes using pg_logical_slot_peek_binary_changes:**
203211

204212
```sql

docs/connectors/postgres/setup/azure.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,14 @@ ALTER PUBLICATION olake_publication ADD TABLE test_table;
225225
INSERT INTO test_table (data) VALUES ('PostgreSQL pgoutput CDC test - INSERT');
226226
```
227227

228+
:::note Delete records and full row values
229+
By default, WAL only includes the primary key on deletes. In OLake, delete records (`_op_type = 'd'`) will therefore only retain the primary key and OLake metadata columns — other columns appear blank or null. To retain the full deleted row run the following query:
230+
231+
```sql
232+
ALTER TABLE test_table REPLICA IDENTITY FULL;
233+
```
234+
:::
235+
228236
**Check for changes using pg_logical_slot_peek_binary_changes:**
229237

230238
```sql

docs/connectors/postgres/setup/gcp.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,14 @@ ALTER PUBLICATION olake_publication ADD TABLE test_table;
205205
INSERT INTO test_table (data) VALUES ('PostgreSQL pgoutput CDC test - INSERT');
206206
```
207207

208+
:::note Delete records and full row values
209+
By default, WAL only includes the primary key on deletes. In OLake, delete records (`_op_type = 'd'`) will therefore only retain the primary key and OLake metadata columns — other columns appear blank or null. To retain the full deleted row run the following query:
210+
211+
```sql
212+
ALTER TABLE test_table REPLICA IDENTITY FULL;
213+
```
214+
:::
215+
208216
**Check for changes using pg_logical_slot_peek_binary_changes:**
209217

210218
```sql

docs/connectors/postgres/setup/generic.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,10 @@ ALTER DEFAULT PRIVILEGES IN SCHEMA schema1 GRANT SELECT ON TABLES TO cdc_user;
151151
- `INDEX`: Uses a specific unique index
152152
- `NOTHING`: Only INSERT operations are replicated
153153

154+
:::note Delete records and full row values
155+
By default, WAL only includes the primary key on deletes. In OLake, delete records (`_op_type = 'd'`) will therefore only retain the primary key and OLake metadata columns — other columns appear blank or null. To retain the full deleted row, use **Option 2** below.
156+
:::
157+
154158
**Set Replica Identity for Tables:**
155159

156160
```sql

docs/connectors/postgres/setup/rds.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,14 @@ ALTER PUBLICATION olake_publication ADD TABLE test_table;
200200
INSERT INTO test_table (data) VALUES ('PostgreSQL pgoutput CDC test - INSERT');
201201
```
202202

203+
:::note Delete records and full row values
204+
By default, WAL only includes the primary key on deletes. In OLake, delete records (`_op_type = 'd'`) will therefore only retain the primary key and OLake metadata columns — other columns appear blank or null. To retain the full deleted row run the following query:
205+
206+
```sql
207+
ALTER TABLE test_table REPLICA IDENTITY FULL;
208+
```
209+
:::
210+
203211
**Check for changes using pg_logical_slot_peek_binary_changes:**
204212

205213
```sql

0 commit comments

Comments
 (0)