
PostgreSQL 9.4 Beta 1 Released - alternize
http://www.postgresql.org/about/news/1522/
======
gdulli
I have an 8TB database with 10 bn rows, each with multiple json columns where
most of the real data is stored... so jsonb day is like christmas for me.

~~~
gwintrob
Mind explaining your setup a bit more and why you're not using NoSQL? That
sounds painful for Postgres.

~~~
meritt
Or alternately: Why wasn't the JSON parsed into normal form if the intent was
to search & filter across that data.

~~~
gdulli
To get the same flexibility you'd want from a nosql data store. Without giving
up the simpler, more open access methods. The schema is partly predictable
(and indexed or fielded on those parts) and partly unpredictable.

~~~
ddorian43
why not add the partly predicted keys as columns ?

also jsonb will require a little more storage

is 8tb in 1 tablespace/db ?

------
johanneskanybal
After playing around in nosql land for the last 3 years I've landed at
postgresql as my go-to sql alternative although the market will keep being
fragmented.

edit: json support in combination with a less fanatic approach to
normalization can approximate some of the benefits a nosql model can while
maintaining the bulk of the tried-and-tested flows in a relational database.

~~~
rpedela
SQL alternative?

~~~
symfoniq
I think he probably means that certain Postgres features like hstore and JSON
support allow it to be used in situations where he once would have chosen a
no-SQL solution. This has been my own experience.

------
tbarbugli
Postgresql is getting better and better! I am happy lately every release has
some more feature / improvement about replication.

------
alternize
looking especially forward to JSONB, the extended array manipulation functions
and the improved GIN index!

~~~
giulianob
I can't wait until they support manipulating JSON directly (e.g. insert object
to end of a JSON array)

~~~
ddorian43
i think there were functions for the new hstore(that became jsonb) but coudn't
make it in core so will probably/hopefully be released as an extension

------
ukd1
non blocking refresh on materialized views is going to be massive! I wonder
when it's going GA and Heroku rollout.

~~~
elchief
Should be GA in August/September if the present mimics the past.

------
vfclists
When is PostgreSQL going to get its own modern language which is
functional/object-oriented/homoiconic/has-all-new-fangled-goodies built in,
with a GUI language thrown in for good measure, so I can do everything in
PostgreSQL without having to turn to another language?

~~~
jeffdavis
By "homoiconic" do you mean that the language would be expressed as a table
(unordered multiset of tuples)?

Interesting thought experiment, but it sounds pretty radical.

~~~
vfclists
To be honest I have no idea what homoiconic means.

I think it means that everything is the same, ie whether a function in the
case of functional languages like Haskell, or an object in languages like
Smalltalk.

~~~
jeffdavis
[http://en.m.wikipedia.org/wiki/Homoiconic](http://en.m.wikipedia.org/wiki/Homoiconic)

"In a homoiconic language the primary representation of programs is also a
data structure in a primitive type of the language itself. This makes
metaprogramming easier..."

For lisp, that means programs are are also lists, so can be manipulated with
macros easily (because lisp macros are also lisp, which is good at working
with lists).

For a relational language, that would mean the programs are also relations,
which would be a little weird because relations are unordered.

------
azinman2
Going to be such a great release. Congrats PostgreSQL team! I love your
product!

------
polskibus
I'm particularly excited about improvements in materialised views that will
make Postgresql better suited to OLAP usage scenarios.

------
corford
pg_prewarm looks interesting but the docs are currently a little opaque as to
how best to use it (for me at least!):
[http://www.postgresql.org/docs/devel/static/pgprewarm.html](http://www.postgresql.org/docs/devel/static/pgprewarm.html)

~~~
wfn
Oh, is it now a built-in module in 9.4beta?

I've used it in 9.1 (downloading the patch, applying it, recompiling
postgres..) - have found this article re: postgres caching mechanisms (and
pg_prewarm use in particular (though re: pg_prewarm, most of it is about
applying the patch itself, etc.)) useful:

[http://raghavt.blogspot.com/2012/04/caching-in-
postgresql.ht...](http://raghavt.blogspot.com/2012/04/caching-in-
postgresql.html)

P.S. here are some more comments from the author:
[http://www.postgresql.org/message-
id/CA+TgmoZihvzFW6n6pPwzDO...](http://www.postgresql.org/message-
id/CA+TgmoZihvzFW6n6pPwzDOBH2G175WcYsyNyuoNrybySs15tPQ@mail.gmail.com) (btw,
I've found the pgsql-hackers to be a great mailing list indeed!)

~~~
corford
Thanks wfn, those links are really helpful.

------
bradleysmith
"ALTER SYSTEM SET, which enables modifications to postgresql.conf from the SQL
command line and from remote clients, easing administration tasks"

This is fantastic. We're always adding and removing ip addresses and
restarting the server with each update was a pain.

~~~
icebraining
Why did you restart the server? You can just send SIGHUP to have it reload the
file without restarting.

~~~
bradleysmith
Hah! Because I'm self-taught, and I didn't know I could.

Appreciate it!

~~~
joevandyk
There's a number of options that you can change in postgresql without having
to restart the whole server.

[http://www.postgresql.org/docs/9.3/static/auth-pg-hba-
conf.h...](http://www.postgresql.org/docs/9.3/static/auth-pg-hba-conf.html)
explains that you can just do a reload after changing pg_hba.conf.

[http://www.postgresql.org/docs/9.3/static/config-
setting.htm...](http://www.postgresql.org/docs/9.3/static/config-setting.html)
explains more.

~~~
bradleysmith
thanks much, digging through both.

------
gfisher
The refresh concurrently materialized views is huge. I am glad that it was
introduced since I currently have to use tables with functions to create/drop
to get the same functionality.

------
nevi-me
Am I right in saying that JSONB is another way to say BSON?

~~~
icebraining
No, they're different formats: [http://pgeoghegan.blogspot.pt/2014/03/what-i-
think-of-jsonb....](http://pgeoghegan.blogspot.pt/2014/03/what-i-think-of-
jsonb.html)

------
justplay
waiting for upset improvement.

~~~
pilif
In that regard, have a look at [http://www.depesz.com/2012/06/10/why-is-
upsert-so-complicate...](http://www.depesz.com/2012/06/10/why-is-upsert-so-
complicated/) which is a very good article explaining why you have to continue
to wait.

Getting MERGE right is one of these "pick two" things. You get to chose
between "fast", "doesn't corrupt data" and "doesn't throw errors at times" but
you only get to pick two.

~~~
spitfire
I pick correct semantics _NOW_ and fix performance issues at your leisure.

upsert has been an embarrassment for Postgres for far too long now.
Particularly obnoxious was the "upsert is hard! Roll your own" stance taken.

~~~
jeffdavis
A completely reasonable stance.

However, it's not so much a performance question as one of concurrency. The
easiest way to get the right semantics is by locking the entire destination
table against concurrent writes. Maybe that's fine for a lot of users. But it
has caused some hesitation, because other users might be disappointed.

It would be fair to say "just do it" though.

------
andyl
With 9.4, what will be the best option for multi-master replication? Will 3rd
party tools like bucardo remain the preferred method, or will there be another
strategy that is more integrated with PG?

~~~
rdtsc
In general on the CAP spectrum where does multi-master replication with
Postgres fall in?

~~~
DrJokepu
Replication in PostgreSQL is actually highly configurable so it depends on how
you set it up: [http://www.postgresql.org/docs/9.3/static/high-
availability....](http://www.postgresql.org/docs/9.3/static/high-
availability.html)

