Uploaded image for project: 'Engineering'
  1. Engineering
  2. ENG-112

The partition key in a tuple can't be updated to a value that hashes differently. (TRAC)

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: Beta/ER
    • Fix Version/s: Future
    • Component/s: Core
    • Labels:
    • Release Note:
      Hide
      Do not use UPDATE to change the value of a partitioning column For partitioned tables, the value of the column used to partition the table determines what partition the row belongs to. If you use UPDATE to change this value and the new value belongs in a different partition, the UPDATE request will fail and the stored procedure will be rolled back. Updating the partition column value may or may not cause the record to be repartitioned (depending on the old and new values). However, since you cannot determine if the update will succeed or fail, you should not use UPDATE to change the value of partitioning columns. The workaround, if you must change the value of the partitioning column, is to use both a DELETE and an INSERT statement to explicitly remove and then re-insert the desired rows.
      Show
      Do not use UPDATE to change the value of a partitioning column For partitioned tables, the value of the column used to partition the table determines what partition the row belongs to. If you use UPDATE to change this value and the new value belongs in a different partition, the UPDATE request will fail and the stored procedure will be rolled back. Updating the partition column value may or may not cause the record to be repartitioned (depending on the old and new values). However, since you cannot determine if the update will succeed or fail, you should not use UPDATE to change the value of partitioning columns. The workaround, if you must change the value of the partitioning column, is to use both a DELETE and an INSERT statement to explicitly remove and then re-insert the desired rows.

      Description

      If you update in a single-partition plan and the hashing changes, then the proc will abort.
      If you update in a multi-partition plan and the hashing changes:
      Currently the proc will abort.
      It needs to change to a delete followed by (or run concurrently with) an insert.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jhugg John Hugg
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Zendesk Support