-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support sequences #4
Comments
Having the sequence live on the master is essentially a must right now, as Right now we eagerly evaluate any "constant expressions" during planning, e.g. we transform For the immediate future, we could expand the types of expressions we eagerly evaluate, or even offer a special |
Nothing stands out in my mind about special support for this kind of thing in 9.5… do you have a quick link to a pgsql-hackers thread on the topic? I'm a pretty heavy lurker in that list but don't remember anything about this. |
Jason: there's some stuff buried in the Bi-directional replication code which allows replicas to pull "chunks" of sequences, in effect allowing for distributed sequences. However, this doesn't at all solve the consistency issue between shards. Maybe we'd be better off implementing a UUID which is compatible with pg_shard instead, something which will be consistent yet unique across shards. Not quite sure how that would work, though. |
Maybe we should borrow code from here? https://github.com/OptionsHouse/shard_manager Shaun has a fairly advanced distributed ID-generation widget. We may need to work out licensing issues though. |
implementing this would be highly appriciated. |
Support sequences is definitely a nice to have. |
pg_shard
needs to support sequences andSERIAL
/BIGSERIAL
. The simplest way to do these for now is to have the sequence live on the master. Later we'll need to do something more complicated, but 9.5 will have machinery for that, I think.The text was updated successfully, but these errors were encountered: