Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

14.
Hstore vs Json
• PostgreSQL already has json since 9.2, which supports document-
based model, but
• It's slow, since it has no binary representaton and needs to be parsed every
tme
• Hstore is fast, thanks to binary representaton and index support
• It's possible to convert hstore to json and vice versa, but current hstore is
limited to key-value
• Need hstore with document-based model. Share it's
binary representation with json !

18.
Nested hstore & jsonb
• В феврале-марте подключается Peter Geoghegan, мы принимаем
решение оставить hstore как есть, чтобы избежать проблем с
совместимостью
• 23 марта Andrew Dunstan закомитил jsonb в ветку 9.4 !
pgsql: Introduce jsonb, a structured format for storing json.
Introduce jsonb, a structured format for storing json.
The new format accepts exactly the same data as the json type. However, it is
stored in a format that does not require reparsing the orgiginal text in order
to process it, making it much more suitable for indexing and other operatons.
Insignifcant whitespace is discarded, and the order of object keys is not
preserved. Neither are duplicate object keys kept - the later value for a given
key is the only one stored.

40.
9.4: Parallelism in PostgreSQL
• «Implementng Parallelism in PostgreSQL. Where We Are Today, and
What's On The Horizon».
htps://www.pgcon.org/2014/schedule/events/693.en.html
PostgreSQL's architecture is based heavily on the idea that each connecton
is served by a single backend process, but CPU core counts are rising much f
aster than CPU speeds, and large data sets can't be efciently processed serially.
Adding parallelism to PostgreSQL requires signifcant architectural changes to many areas of the system,
including background workers, shared memory, memory allocaton, locking,
GUC, transactons, snapshots, and more.

50.
9.4: Logical Replicaton (2)
• Физическая репликация имеет ограничения (Robert Haas):
htp://rhaas.blogspot.ru/2011/02/case-for-logical-replicaton.html
• You can't replicaton to a diferent major version of PostgreSQL.
• You certainly can't replicate to a database other than PostgreSQL.
• You can't replicate part of the database.
• You can't write any data at all on the standby.
• You certainly can't do mult-master replicaton.
• MVCC bloat on the master propagates to the standby.
• Anything that would bloat the standby causes query cancellatons instead, or
delays in recovery (or in 9.1, you'll be able to avoid the query cancellaton by
bloatng the master).