Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
Today, using ALTER TABLE or ALTER INDEX commands, the user can make certain changes to the schema. For example, changing certain table properties like TTL and immutability, adding nullable columns/dropping non-pk columns are allowed as well as certain index state changes. All of the allowed changes don’t require the table to be re-written. As soon as the ALTER command returns, most of the changes became available immediately (eg. index disable, TTL) but some of them might take some time and the syntax lets you to specify async (eg. Rebuild index) and depending on the client cache settings, some changes never make it to the client (eg. select * that run from a client never seeing the new column since its schema cache is not updated).
If the user wants to change the schema properties that require table re-writes, it is blocked and ALTER fails. Phoenix lacks of the ability to change some of the table schemas and attributes, such changing the row key (primary keys), the type of a column, the table storage format, the column encoding, etc. There is no way to make this changes with no or very minimal service interruption.
Design doc link: https://docs.google.com/document/d/1D24zRETMEetXvc3MSZj9WKYeUnooQX5BLv6gSDEmwfk/edit?usp=sharing
Attachments
Issue Links
- is duplicated by
-
PHOENIX-2341 Rename in ALTER statement
- Resolved
- links to