Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update state_storage.md to include postgresql offsets #776

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading