1

I want to use citus data to shard my postgres database. before jumping into it i want to fully understand its behaviour in different scenarios. Although the docs explain most of the cases.

I want to know how would I go about moving data to a different shard when i update tenant_id of a record?

Aitizazk
  • 332
  • 1
  • 4
  • 16

1 Answers1

1

Citus errors out when you try to update the value of the partition column. You can move the data with INSERT INTO ... SELECT ... followed by a DELETE FROM ... inside a transaction.

Ahmet Eren Başak
  • 493
  • 1
  • 4
  • 14