Hacker News new | past | comments | ask | show | jobs | submit login
PostgreSQL 9.0 Is Now Available (phoronix.com)
132 points by spahl on Sept 19, 2010 | hide | past | favorite | 27 comments



These two new features sound particularly interesting to me:

Streaming Replication: http://www.postgresql.org/docs/9.0/static/warm-standby.html#...

Hot Standby: http://www.postgresql.org/docs/9.0/static/hot-standby.html


I've never delved into this domain before, but why is it that it is so hard to create multi-master replication for Postgres? We were considering it at work, and it seems the only solutions that provide that are unmaintained third party scripts written in Perl/Ruby, etc. MySQL has the NDB cluster solution, but that is way too restrictive as everything must be kept in memory.


It's hard because of the consistency guarantees that PostgreSQL makes. If you need true multi-master replication (you probably don't) the best solution is to use some form of queue to manage writes across the cluster. The DRBD solutions sound awesome but trade one SPOF for another, and have drawbacks in terms of speed (replicating block devices makes them slow) and risk (network latency, write contention) and are limited to at most two masters.

If you find yourself needing a replication solution beyond hot standby; it's possible that PostgreSQL isn't the right tool for the job.


Bucardo provides multi-master replication for PostgreSQL http://bucardo.org/ and is actively maintained, albiet written in Perl.

The reason most replication systems sit outside of PostgreSQL are there are many different use cases for replication and no one method is going to get it right enough to complicate the core code. There are efforts underway to create a common structure to base replication on so that projects like Bucardo, Slony and Londiste can more easily and reliably plug into the core database engine for replication.


NDB cluster is not something I'd recommend to anyone. At least it wasn't 2 years ago. I got random failures that only people at #mysql-ndb on freenode could explain, very cryptic log files, weird configuration bugs reproduced by tens of people and not fixed for years, etc.

It's even harder to maintain than multi-master. You know what can fail in multi-master and how to check it - 99% of cases is just one of the nodes stopping accepting the replication stream for some reason. You can check that easily, because you see secs_behind > 0 on the slave status - everything else ends up in the error log.

With NDB, the situation is much harder. You've got 3 types of nodes that can fail, you don't easily see if one of them failed (I had situations where every node was "connected", both data nodes were "live", but the manager (or was it frontend...) decided they're out of sync and cannot deal with them at all). Effectively you've got a network of independent nodes which can fail and not output any error - it's another node that shows you only the effect of such failure. I could not find any way to reliably monitor the cluster status and there are not nearly enough information on the web to solve the problems on your own. #mysql-ndb is great, but the people there can give you a patch to your database "to try if it fixes the problem" - problem that cannot be easily reproduced and causes the DB to stop working under a high load in the middle of the day - exactly when I need to DB to stay up.

Multi-master was a lot less painful.


Wow, thanks for all the replies. What I'm primarily interested in is eliminating single points of failure. So a number of web servers can bounce between any of the (geographically separated) database servers for read and write queries. I'm wondering if this is possible in a clean way with some general solution or if application code has to support partitioning of data to make this work.


pgpool-II seems to be well maintained and simple. I'm not sure what you wish for, but pgpool-II seems to be it.

I think MySQL's swappable storage engines make building replication a tad easier. Actually, I have no idea.


For people without scaling/HA needs, the new permissions enhancements are a god-send for DBAs. PostgreSQL has very granular permissions, and it used to be impossible to grant default permissions within a database, as one can in MySQL. This can be very frustrating in multi-user environments.


Good call. I skipped over that, but you're right: it will come in very handy (for example, my local development DB).


What I really like about PostgreSQL compared to e.g. MySQL is the support for partial indexes (http://www.postgresql.org/docs/8.0/static/indexes-partial.ht...).

Especially when keeping normalized data, it allows the easy creation of an index without having the need to index ALL records and blow up the b+tree


Bit premature imho. The offical release day is tomorrow, and these kind of announcements only cause confusion and do no good for anyone.

But awesome job PG team, it's my favorite SQL server.


> it's my favorite SQL server

Agreed. It Excels in what it does and hast fastest Access times.

[edit: didn't mean to start a pun thread.]


Word.


I didn't want to laugh at these last 2 comments... but it slipped out anyway. Nicely done.


I really shouldn't indulge in this on HN, but One might Note that it has a good Outlook.

EDIT: Downvotes feel good, in a way. Too much focus on karma, recently, amongst a subset of the current HN population.

Figured I'd been around long enough to appreciate a rare moment of humor from another old-timer, and dip my oar in -- even if in a slightly ill-advised fashion.

The caffeine made me do it! Now, on to work...


It appears you all are determined to absolutely bury me. Fine, I guess I asked for it.

But, HN used to have a bit better sense of humor and camaraderie, particularly for those who didn't abuse the privilege. I guess things really have changed, here.

Maybe just par for the course, with the community having grown so much -- most people aren't familiar with most other user ID's, anymore.


Well, I think the humor was appropriate. This isn't a corporate board meeting, it's supposed to be a community of developers and entrepreneurs. All communities need inside jokes (among other things) to help create a sense of cohesion.


Downvotes are the new upvotes.


Really? You capitalize excel and access in every day use?


I really strongly dislike Phoronix. I don't know why it hasn't been replaced yet.


What are your specific beefs?


I'm not the OP, and I don't follow phoronix regularly, but it seems sensationalist at times.


Any ideas when they plan to include materialized views? Last I checked it was part of this years GSoC.


Pretty sure they already supported that in early versions....?


No.. Unfortunately, they don't.


Looks like it's fairly straightforward to do it manually with triggers. http://wiki.postgresql.org/wiki/Materalized_Views


Hello! What are the problems there have multimaster replication PostgreSQL v9? Is the problem solved update error, conflict, uniqueness, and delete?

Thank you.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: