VACUUM should cleanup aosegs/aocssegs in AOSEG_STATE_AWAITING_DROP state
Due to the different phases of VACUUM, compaction phase could have committed but the drop was cancelled. This could leave some aoseg/aocsseg entries in AOSEG_STATE_AWAITING_DROP state which could then be cleaned up in a subsequent VACUUM as expected... but it currently just skips. The master keeps a hash table (AppendOnlyHash) and uses it during VACUUM to check tuple count, state, and aborted/committed. Our issue here is that state checking was only being done against state AWAITING_DROP_READY. It was not including COMPACTED_AWAITING_DROP in the state check. This commit adds the check and updates the detailed comment block on the state transitions in appendonlywriter.h.
Showing
想要评论请 注册 或 登录