Baron Schwartz wrote:


I think we can also potentially look to other products and how they do this.

MVCC might enable transactional, non-blocking ALTER TABLE, for
example.  Instead of building a whole new table and copying each row
into it, you could version the rows.  Copy each row into a new row,
and mark the old one as deleted in the ordinary MVCC way.  Then an
ALTER really just looks like an UPDATE.

I realize I'm totally waving my hands about the "hard" parts of this.
But it is doable.

There may be a little more to it. Old and new rows will likely have different formats. But it may be possible to distinguish formats based on transaction ids or something, and transactions concurrent to the DDL transaction will save their modifications in the old format But then you cannot throw away old dictionary data before you are sure that all old rows are converted to the new format.

Or convert the modified data during a catchup phase where no concurrent transactions are allowed. Transactions involving the modified tabl that are still active can be aborted and will have to do a new try using the new format.

Roy

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to