w1397800 opened a new issue, #7581: URL: https://github.com/apache/incubator-seata/issues/7581
### Check Ahead - [x] I have searched the [issues](https://github.com/seata/seata/issues) of this repository and believe that this is not a duplicate. - [x] I am willing to try to fix this bug myself. ### Ⅰ. Issue Description I found that in the PostgresqlUndoLogManager class, the sequence name undo_log_id_seq used in the insert SQL statement is hardcoded: `INSERT INTO undo_log (...) VALUES (nextval('undo_log_id_seq'), ...)` This causes an issue when the undo log table name is customized via configuration (e.g., in application.yml). Because the sequence name does not update to match the new table name, insert operations fail or behave incorrectly. Steps to reproduce: 1. Configure Seata to use a custom undo log table name, for example my_undo_log. 2. The sequence name remains hardcoded as undo_log_id_seq in the SQL. 3. On insert, PostgreSQL throws an error because the sequence undo_log_id_seq does not exist or does not match the new table. Expected behavior: - The sequence name used in the insert SQL should be dynamically derived from the configured undo log table name, for example my_undo_log_id_seq for table my_undo_log. - This would make the undo log manager compatible with table name customization. Suggested fix: - Make the sequence name configurable or derived from the undo log table name dynamically. - Update the insert SQL statement in PostgresqlUndoLogManager accordingly. ### Ⅱ. Describe what happened _No response_ ### Ⅲ. Describe what you expected to happen _No response_ ### Ⅳ. How to reproduce it (as minimally and precisely as possible) _No response_ ### Ⅴ. Anything else we need to know? _No response_ ### Ⅵ. Environment _No response_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
