ADD COLUMN on an AOCO table should check and drop aocssegs in await drop
When doing an ADD COLUMN operation on an AOCO table, the vpinfo byte array stored in the aocsseg auxiliary table for each column is updated to add an extra vpinfo index to match the relnatts value in pg_class. However, entries in the aocsseg auxiliary table with state 2 (AOSEG_STATE_AWAITING_DROP) will not have their vpinfo byte array updated. Subsequent calls to getAOCSVPEntry function will then fail due to the vpinfo size does not match the relnatts value in pg_class (e.g. persistent table rebuild). Since we have the AccessExclusiveLock on the table during ADD COLUMN, we might as well schedule the drop before the vpinfos are updated to prevent any inconsistency issues.
Showing
想要评论请 注册 或 登录