You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I understand correctly, the bigserial type is unique across all nodes by doing the following:
Citus shifts the start of a bigserial by node_group_id * 2^48, which means that you are limited to a maximum of 2^18 shards that are practically unlimited.
The problem:
I need to produce the shortest possible unique strings in a column, and that's achieved by inserting a row into a table and then taking its primary key and encoding it to produce a string (then updating the desired column with it). Values generated from bigserial would be too big, as the encoded values would be long from the start.
Can the generated ID be unique across all nodes? Even if it's possible, I assume it would be a bottleneck.
Can the bigserial generation be modified so the initial shift would be defined manually?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
As I understand correctly, the
bigserial
type is unique across all nodes by doing the following:Citus shifts the start of a bigserial by
node_group_id * 2^48
, which means that you are limited to a maximum of 2^18 shards that are practically unlimited.The problem:
I need to produce the shortest possible unique strings in a column, and that's achieved by inserting a row into a table and then taking its primary key and encoding it to produce a string (then updating the desired column with it). Values generated from bigserial would be too big, as the encoded values would be long from the start.
Can the generated ID be unique across all nodes? Even if it's possible, I assume it would be a bottleneck.
Can the bigserial generation be modified so the initial shift would be defined manually?
What are the possible solutions?
Beta Was this translation helpful? Give feedback.
All reactions