NoSQL - JSONB • “Binary JSON” – Different from JSON, a text representation – Faster for searching • With JSONB... – No duplicated keys allowed. Last wins. – Key order not preserved. – Can take advantages of GIN Index.
Analytics - Aggregation • Ordered-set aggregates – mode(), most common value in a subset
Analytics - Aggregation • Ordered-set aggregates – rank(), rank of a value in a subset
Analytics – Materialized Views • REFRESH MATERIALIZED VIEW CONCURRENTLY myview • Allows refreshing a MV concurrently without taking exclusive lock. • Refreshing a large MV can benefit from CONCURRENTLY in terms of usability.
Replication and Beyond (Logical Decoding)
Replication and Beyond – Logical Decoding • “Logical” representation from replication stream – INSERT/UPDATE/DELETE operations – Can be replayed on different version/platform • pg_recvlogical command – It shows how it works • Replication can be more flexible – BDR (Bi-Directional Rep.), Slony, and more ... – Continuous Backup as well
Administration (ALTER SYSTEM)
Administration - ALTER SYSTEM • ALTER SYSTEM SET – puts new value in postgresql.auto.conf – pg_reload_conf() reloads them. – postgresql.auto.conf takes priority over postgresql.conf. • ALTER SYSTEM RESET – Remove values from postgresql.auto.conf.
Infrastructure (For Parallelization)
Dynamic Background Workers • In 9.3, background workers must start at the postmaster startup. • After 9.4, they can be launched “on-demand” basis. • From parallelization point of view... – It allows to launch multiple background processes to execute child queries in parallel.
Dynamic Shared Memory • Shared memory can be allocated “on-demand” basis – Cf.) by background workers • Main segment (ex. shared_buffers) still fixed at startup • Also supports lightweight message queue • From parallelization point of view... – It allows to share data and communicate with several bgworker processes.