So, here is brand new implementation of the same thing. Now instead of creating pgproc entry for prepared transaction during recovery, I just store recptr/xid correspondence in separate 2L-list and deleting entries in that list if redo process faced commit/abort. In case of checkpoint or end of recovery transactions remaining in that list are dumped to files in pg_twophase. Seems that current approach is way more simpler and patch has two times less LOCs then previous one. -- |
twophase_recovery_list.diff
Description: Binary data