To be clear, what I want is: - The ability to deploy a cluster of say, 5 replicated PostgreSQL instances - All write transactions go to a single leader, which replicates them to the other instances - Reads can go to any instance - If a leader crashes the cluster will elect a new one without human intervention, and no committed transactions will be lost.
I've always been unclear on how to do this with Postgres.
I've worked mostly with MariaDB Galera Cluster which is pretty effortless to setup, but for PostgreSQL there doesn't seem to be any clear direction on how to do the same things.
There are plenty of other replication solutions available for Postgres, indeed.
The significance is one of performance and convenience: before, you would have had to construct a new jsonb object with only the field(s) you wanted modified changed. (In fact it is possible to define these new operators in terms of such; I have done so.) Now you can just use these handy built-in functions, which presumably perform better than the manual method as well.
If you do:
update aTable
set loginInfo = loginInfo - 'lastLogin'
where 'loginInfo' is a jsonb column, you, the programmer, need not write out the parts of the data to keep. PostgreSQL still sees this as 'read column, evaluate expression, write result', so it will read and write the entire jsonb value.When you do need to update JSONB columns this is a big improvement. You still should consider the size of your JSONB columns and the number & frequency of updates to those rows.