This introduces macros to wrap differences between 9.5 and 9.6 read-
and out- functions for our custom nodes, allowing better code reuse
for those functions.
Additionally, if running on PostgreSQL 9.6, this change will register
extensible node types for all our custom nodes, permitting us to rely
on the standard PostgreSQL nodeToString, stringToNode, and readNode
functions.
Long-term, this change lets us avoid copy-pasting a ton of readfuncs
code as well as well as some other static methods we've been copying
in the past.
So far placements were assigned an Oid, but that was just used to track
insertion order. It also did so incompletely, as it was not preserved
across changes of the shard state. The behaviour around oid wraparound
was also not entirely as intended.
The newly introduced, explicitly assigned, IDs are preserved across
shard-state changes.
The prime goal of this change is not to improve ordering of task
assignment policies, but to make it easier to reference shards. The
newly introduced UpdateShardPlacementState() makes use of that, and so
will the in-progress connection and transaction management changes.
All citusdb references in
- extension, binary names
- file headers
- all configuration name prefixes
- error/warning messages
- some functions names
- regression tests
are changed to be citus.