Perform cleanup phase even if open relation failed during drop phase of vacuum.
Vacuum of AO tables happens in four phases: prepare, compact, drop and cleanup. When there are concurrent transactions executing vacuum on AO tables, if one of the vacuum transaction is executing a drop phase, the other transaction will not be able to open the relation if it is also executing the drop phase. When the relation open fails, vacuum simply exits without performing the cleanup phase. The relfrozenxid in pg_class is updated during the cleanup phase and hence the age of the table does not get reduced. This becomes a problem because the age of the database does not reduce and eventually the xid wraparound issue will be encountered. This problem is fixed by performing the cleanup phase even if the open relation fails during drop phase.
Showing
想要评论请 注册 或 登录