apache / apache/incubator-seata
undo_log表自增序列
- Dominant language
- Java
- Stars
- 26k
- Forks
- 8.8k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 4
Description
## Why you need it?
ToG项目上第三方数据库管理方鉴于安全管理考虑,禁止使用pgsql的public模式,但是服务端的undo_log必须使用public模式下的自增序列
private static final String INSERT_UNDO_LOG_SQL = "INSERT INTO " + UNDO_LOG_TABLE_NAME +
" (" + ClientTableColumnsName.UNDO_LOG_ID + "," + ClientTableColumnsName.UNDO_LOG_BRANCH_XID + ", "
+ ClientTableColumnsName.UNDO_LOG_XID + ", " + ClientTableColumnsName.UNDO_LOG_CONTEXT + ", "
+ ClientTableColumnsName.UNDO_LOG_ROLLBACK_INFO + ", " + ClientTableColumnsName.UNDO_LOG_LOG_STATUS + ", "
+ ClientTableColumnsName.UNDO_LOG_LOG_CREATED + ", " + ClientTableColumnsName.UNDO_LOG_LOG_MODIFIED + ")"
+ "VALUES (nextval('undo_log_id_seq'), ?, ?, ?, ?, ?, now(), now())";
## How it could be?
能否修改插入的自增序列和undo_log表一样支持配置或者插入的时候不从代码层面获取主键id
## Other related information
Add any other context or screenshots about the feature request here.
Contributor guide
Research direction
Start by locating the PostgreSQL code containing INSERT_UNDO_LOG_SQL and review how the undo_log table and its sequence are configured. Determine how sequence naming or primary-key generation should be supplied without assuming the public schema. Done means undo_log inserts work with a non-public PostgreSQL schema and the relevant compatibility behavior is covered by the project's existing tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, postgresql
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100