Friday, November 16

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 (more…)

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 (more…)

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 (more…)

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 (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 (more…)

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 (more…)

“PostgreSQL 9.0 High Performance” book is out

Greg's PlanetPostgreSQL, International News, PostgreSQL, United States News
Since I've already pushed my book here once on my blog this week, this version will be short and include two chunks of free (as in beer) content for you.  My book covering PostgreSQL performance, from versions 8.1 to 9.0, is now available.Downloads of the 468 page e-book text are available immediately from Packt Publishing.  Publication of the associated code samples and shipping of printed copies will follow soon.  There's even a free sample chapter covering Database Hardware, including critical information about how to keep your database writes safe with various types of disks and controllers.  Secret for blog readers only:  there's also an article about Server Configuration Tuning snipped from that chapter of the book you can read too."PostgreSQL 9 (more…)