Monday, June 26

Reducing the postgresql.conf, parameter at a time

Greg's PlanetPostgreSQL, PostgreSQL, United States News
One of the more useful bits of PostgreSQL documentation I ever worked on is Tuning Your PostgreSQL Server.  When that was written in the summer of 2008, a few months after the release of PostgreSQL 8.3, it was hard to find any similar guide that was both (relatively) concise and current. Since then, myself and many other PostgreSQL contributors have helped keep that document up to date as changes to PostgreSQL were made.The interesting and helpful trend during that period is that parameters keep disappearing from the set of ones you need to worry about. In PostgreSQL 8.2, there was a long list of parameters you likely needed to adjust for good performance on a PostgreSQL server: shared_buffers, effective_cache_size, checkpoint_segments, autovacuum, max_fsm_pages, default_...

How not to build PostgreSQL 9.0 extensions on RPM platforms

Greg's PlanetPostgreSQL, PostgreSQL, United Kingdom News, United States News
For a long time, adding packages to RedHat derived Linux systems has been called "RPM Hell", for good reason.  Particularly before the yum utility came about to help, getting RPM to do the right thing has often been a troublesome task.  I was reminded of this again today, while trying to compile a PostgreSQL extension on two nearly identical CentOS systems.PostgreSQL provides an API named PGXS that lets you build server extensions that both leverage the code library of the server and communicate with it.  We use PGXS to install our repmgr utility, and having that well defined API let the program be developed externally from the main server core.  Many popular pieces of PostgreSQL add-ons rely on PGXS to build themselves.  In fact, the contrib modules that come with...

Updates to PostgreSQL testing tools with benchmark archive

Greg's PlanetPostgreSQL, PostgreSQL
I maintain a number of project whose purpose in life is to make testing portions of PostgreSQL easier.  All of these got a decent upgrade over this last tests how memory speed increases on servers as more cores are brought into play.  It's fascinating data, enough of it there to start seeing some real trends.  It now works correctly on systems with large amounts of CPU cache, because they have many cores.  It was possible before for it to be so aggressive with sizing the test set to avoid cache impact that it used more memory than could be allocated with the current design of the stream code.  That's been scaled back.  If you have a 48 core server or larger, I could use some more testing of this new code to see if the new way I handle this ...

Telling Your Users to Go Fork Themselves

Greg's PlanetPostgreSQL, PostgreSQL
As the PostgreSQL Elephant continues its march toward yet another release, I've been thinking quite a bit about the role users of software should have in its user interface design. Today I proposed something that makes a database parameter people used to have to worry about, and that wasn't obvious at all how to set, and makes its value largely automatic. That's a pretty unambiguous forward change; users were annoyed, good default behavior established, and that default behavior suggested as a patch. If it's applied I'd be shocked to find anyone who considers that a bad decision.There's been a similar discussion of how to rework the user interface around database checkpoints. Right now, the speed at which data is written to disk by a checkpoint is impacted by three values the u...

Easier PostgreSQL 9.0 clusters with repmgr

Greg's PlanetPostgreSQL, International News, United Kingdom News, United States News
When PostgreSQL 9.0 shipped a few months ago, it included several new replication features. It's obvious that you can use these features to build clusters of servers for both high availability and read query scaling purposes. What hasn't been so obvious is how to manage that cluster easily. Getting a number of nodes installed and synchronized with their master isn't that difficult. But while the basic functions necessary to monitor multiple nodes and help make decisions like "which node do I promote if the master fails?" were included in 9.0, the way they expose this information is based on internal server units. There are a few common complaints that always seem to show up once you actually consider putting one of these clusters into a production environment: How do I handle ad...

pgChess code published

Gianni's PlanetPostgreSQL
I have been lucky enough to be invited at the marvellous 2012 conference in Stuttgart, which ended just yesterday.The topic of the first of my two talks has been a collection of PostgreSQL objects that play chess, either between themselves or against a human (see this nice photo, thanks steerio!).(more…)

PostgreSQL CommitFest #3 for 9.1 needs you!

Greg's PlanetPostgreSQL, United States News
PostgreSQL development is now done with periodic pauses to review and commit patches that have been submitted, called Commit Fests.  The patches themselves are stored on a custom web app, and documentation about the process is on the PostgreSQL wiki.  I'm returning to the role of CommitFest manager for this one, which means I get to harass people all month trying to get patch review finished.  There are currently 26 patches that have no reviewer assigned to them.  If you were ever interested in making a contribution to the PostgreSQL code base, getting involved in the review process is a great way to learn the attributes of patches that are committed, and to see how others fail to gain traction.I submitted three patches myself this time, and one of them got comitted in ...

PG West talks

Greg's PlanetPostgreSQL, United States News
My tour this week of the PostgreSQL West conference has taught me that you can deliver three talks in two days, or you can have fun seeing other people's talks, but it's rather difficult to do both.  My own talks are now uploaded to our talks page.  You can also find the slides from Hannu's talk on Django/Python database calls, which unfortunately he was too ill to deliver in person.Out of the limited number of other presentations I did see, the standout for me was Nathan Boley's look at "Improving Planner Prediction Accuracy with Custom Selectivity Function".  I'm hoping to take Nathan's new ideas for judging how close the PostgreSQL statistics match the underlying data and apply them to some difficult tables on a few client production systems.I'd also highly recommend Bruc...