3. Satoshi Nagayasu
• Database Engineer
• Data Center Engineer
• ITSM Specialist
• Data Steward
• System Architect
• Co-founder
• CTO
4. What I Did in PostgreSQL
• pgstatindex
• pageinspect
• xlogdump
– ... and lots of rejected patches!
• Patch review
• PostgresForest, Postgres-XC
– at my prev jobs
5. Thanks to...
• Magnus Hagander
• Michael Paquier
• Toshi Harada
• Noriyoshi Shinoda
• ... and many pg guys!
8. 9.4 Overview - Status
• Current Status
– RC1 released on 20th November
• Officially announced 9.4 to be released
on 18th December (the next Thursday)
9. 9.4 Overview - Statistics
• As of beta2 (by Magnus Hagander)
– 2222 files changed
– 131,805 insertions (+)
– 59,333 deletions(-)
• As of RC1 (by Michael Paquier)
– 2183 files changed
– 374,421 insertions (+)
– 209,439 deletions (-)
15. 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.
16. NoSQL - GIN Index
• JSON+btree vs. JSONB+GIN
– Btree indexes vs. GIN index
Table Index Size Comparison
http://www.slideshare.net/toshiharada/jpug-studyjsonbdatatype20141011-40103981
22. 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.
24. 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
27. 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.
29. 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.
30. 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.