Implementation details
Postgres replication protol use-cases
The postgres replication protocol provides the necessary information to propagate the update. This table summarizes the various cases used to build a WHERE clause.
Operation | Indicator | Values | OldValues | Where | Notes |
---|---|---|---|---|---|
UPDATE | K | Modified values | Old primary Key | PK=OldValues.PK | Primary key was modified |
UPDATE | O | Modified values | Full row | columns=OldValues | Replica identity full |
UPDATE | 00 | Modified values including PK | PK=Values.PK | Primary Key was not modified | |
DELETE | K | Primary key | PK=Values.PK | Primary key was deleted | |
DELETE | O | Full row | columns=Values | Replica Identity Full | |
DELETE | 00 | Should never happen |
References
- Articles
- Postgres Documentation
- Protocol:
- Go pgx and tools