Skip to content

Commit

Permalink
Merge pull request #776 from Altinity/subkanthi-patch-3
Browse files Browse the repository at this point in the history
Update state_storage.md to include postgresql offsets
  • Loading branch information
subkanthi authored Aug 28, 2024
2 parents 988961b + c148234 commit 3c98575
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions doc/state_storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,24 @@ This table is used by Debezium to store historical DDL statements so the DDL sta
| Column Name | Description | Example |
|-------------|----------------------------------------------------------------------|---------|
| id | UUID | |
| history_data | UUID | {"source":{"server":"embeddedconnector"},"position":{"ts_sec":1724867891,"file":"mysql-bin.000003","pos":197,"gtids":"03d24fcc-6567-11ef-9978-0242ac130003:1-56","snapshot":true},"ts_ms":1724867891697,"databaseName":"test","ddl":"DROP TABLE IF EXISTS `test`.`orders`","tableChanges":[{"type":"DROP","id":"\"test\".\"orders\""}]} |
| history_data | binlog information and DDL | {"source":{"server":"embeddedconnector"},"position":{"ts_sec":1724867891,"file":"mysql-bin.000003","pos":197,"gtids":"03d24fcc-6567-11ef-9978-0242ac130003:1-56","snapshot":true},"ts_ms":1724867891697,"databaseName":"test","ddl":"DROP TABLE IF EXISTS `test`.`orders`","tableChanges":[{"type":"DROP","id":"\"test\".\"orders\""}]} |
| history_data_seq | Monotonically increasing sequence number | |
| record_insert_seq | Timestamp when record is inserted. | 2024-08-28 12:58:22 |
| record_insert_ts | Monotonically increasing number | 174 |



# Offsets table.(PostgreSQL)
| Column Name | Description |
|-------------|----------------------------------------------------------------------|
| id | UUID |
| offset_key | [\"debezium-embedded-postgres\",{\"server\":\"embeddedconnector\"}]" |
| offset_val | |
| record_insert_seq | |
| record_insert_ts | |
The offsets table defined by the `offset.storage.jdbc.offset.table.name`
Default: **"altinity_sink_connector.replica_source_info"**
This table is used to store the binlog file, position and gtids.
| Column Name | Description | Example |
|-------------|----------------------------------------------------------------------|---------|
| id | UUID | |
| offset_key | This is the Unique key for every connector. Its a combination of `name` configuration variable and the `topic.prefix` configuration variable | [\"debezium-embedded-postgres\",{\"server\":\"embeddedconnector\"}]"|
| offset_val | This column stores the LSN information for PostgreSQL | {"last_snapshot_record":true,"lsn":27476744,"txId":744,"ts_usec":1724875350871964,"snapshot":true}
| record_insert_seq | Timestamp when record is inserted. | 2024-08-28 12:58:22 |
| record_insert_ts | Monotonically increasing number |

### offsets_value
- **lsn_proc** - Last processed LSN
Expand Down

0 comments on commit 3c98575

Please sign in to comment.