bk99.de entertain the web since 1997

PostgreSQL 9.4 introduces JSONB

Summary

PostgreSQL 9.4 adds binary-stored JSON, new replication options and better tools for analytical and operational workloads. PostgreSQL 9.4 was released in December 2014. JSONB supports indexing.

Ideas

  • JSONB stores documents in a decomposed binary representation.
  • GIN indexes speed up searches within JSON documents.
  • Materialised views can be refreshed without long read locks.
  • Replication slots prevent WAL data that is still needed from being removed too early.

Insights

  • Relational and document-oriented models can coexist in the same database.
  • A flexible schema does not replace deliberately chosen integrity rules.
  • Operational features determine the value of a database as much as query syntax.

Facts

  • The version added logical decoding as a foundation.

Recommendations

  • Only use JSONB for structures that are actually variable.
  • Monitor replication slots for retained WAL volumes.

References

Read the original article

Search the Web Archive