Home Organize shards with citus data when tenant_id of a record is updated
Reply: 1

Organize shards with citus data when tenant_id of a record is updated

Aitizazk
1#
Aitizazk Published in 2017-09-13 13:16:30Z

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?

Ahmet Eren Başak
2#
Ahmet Eren Başak Reply to 2017-09-13 14:33:16Z

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.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.311837 second(s) , Gzip On .

© 2016 Powered by cudou.com design MATCHINFO