Book review: PostgreSQL 9 High Availability Cookbook

PostgreSQL 9 High Availability Cookbook: Pact Publishing, 2014

As it happens with fiction literature, I did not quiet like this book from the very beginning, but it became interesting after the first chapter. So, if you read it cover to cover, get some patience.

In the beginning, the author admits that he does not cover cloud specific Postgres high availability methods.  Well, it leaves an opportunity for somebody else to write a book dedicated to Postgres in a cloud. Also, the subject of high availability is huge and cannot be fully covered in a limited format of a cookbook. Anyway, the majority of the book’s material is relevant in a cloud environment, too.

The whole first chapter “Hardware Planning”, perhaps, may have some value for a new to the subject users, but only to get basic ideas. Some recipes in this chapter are obvious, very basic, or oversimplified. Just one example, “Having enough IOPS” (p.11) is oversimplified in its relying on arbitrary assumptions.  It is not clear why the author assumes that 3.5″ hard drives produce 500 IOPS and 2.5” drives 350 IOPS (page 12). And don’t believe that you can get 500 IPOS from a 15K RPM drive. Even storage vendors usually claim no more than 180 IOPS. We are talking about random IOPS here, right? It does not make sense to plan a system for perfectly sequential IOs. I could continue complaining about the first chapter. Towards the end of it I was seriously thinking about putting the book away.

My patience was fully rewarded in the consecutive chapters.

As a cookbook should, it provides a bunch of handy queries. An example of a recipe with handy queries is “Identifying important tables” on page 53. There are also many very useful techniques like “Defusing cache poisoning” (how to avoid database slowness caused by empty caches after a crash), “Exploring the magic of virtual IPs” (how to switch to a standby server without using additional software), “Terminating rogue connections” (how to kill connection which does not want to die). These are just a few examples out of many. 

The author recommends and explains multiple handy Postgresql extensions and Linux tools throughout the book. dstat, iotop, and iostat are just a few out of really many. Hopefully, the  readers already know how to use iostat or sar, but some other recommended tools are less known. Honestly, some tricks were new for me. In the end, I felt satisfied with the book. This book may teach new users many useful technics, tools, and queries. It also not just provides recipes, but in most cases provides good insights on how the things work.  Experienced users may just use it as a source of readily available queries and commands and save time on producing their own.  I would totally recommend this book to anybody who needs to maintain Postgresql databases. 

 

 

 

About igorsf

I'm specializing in data architecture and database administration. After quite a few years as an Oracle DBA, my interest of the last few years is Postgresql database and all things related.
This entry was posted in Books, Database, Postgresql and tagged . Bookmark the permalink.

Leave a comment