Enhancement: Commit sequence numbers for distributed transactions
- Dominant language
- C
- Stars
- 1.4k
- Forks
- 247
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 39
Description
This feature request originated from Ashwin's comment here: https://github.com/greenplum-db/gpdb/pull/10177#issuecomment-645690791. It seemed worth tracking as an issue.
The basic idea is to eliminate distributed in-progress array and determine tuple visibility by comparing the tuple's CSN with the snapshot's CSN. CSN is a monotonically increasing 64-bit integer. Tuples continue to record local transaction IDs. CSNs are generated and assigned during commit and a mapping between the local XID and its CSN needs to be maintained (this is similar to distributed transaction log).
CSN related proposals for PostgreSQL:
- https://www.postgresql.org/message-id/171f45038c4.bf66538a492783.4211925925146471362%40highgo.ca
- https://www.postgresql.org/message-id/07b2c899-4ed0-4c87-1327-23c750311248%40postgrespro.ru
- https://www.postgresql.org/message-id/20200301083601.ews6hz5dduc3w2se@alap3.anarazel.de
Contributor guide
Research direction
The issue names no source files, tests, or entry points. Start by reading the originating Greenplum pull-request comment and the linked PostgreSQL CSN proposals, then trace how distributed transaction visibility and transaction-log mappings are handled; done would require an agreed design and implementation for CSN assignment, XID-to-CSN mapping, and snapshot visibility.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, postgresql
- Domain
- databases, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100