Add fast recovery option to recover_prepared_transaction
Open
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
The normal implementation of `recover_prepared_transactions` does not block 2PCs, but can cause table bloat.
We sometimes get into trouble with `pg_dist_transaction` becoming very large and transaction recovery or autovacuum struggling to delete tuples fast enough to bring it down in size. It would be useful to have a fast way to reset pg_dist_transaction by adding an option to `recover_prepared_transactions` which:
1. blocks 2PCs
2. rolls pending prepared transactions on workers forward
3. truncates pg_dist_transaction
That way, we can quickly restore order in case of emergency.
Contributor guide
Assessment
This issue has not been assessed yet.