Autovacuum Internals (From 2008)

I wrote this entry for planet postgreql back in 2008. I am posting it here again not to lose it. The details here are a bit out of date but some of them might still be relevant.

Autovacuum, something that comes up a lot when you talk about PostgreSQL maintainence, and it is relatively new, started from PostgreSQL 8.1 to be part of the backend proper. Before that it was a contrib module IIRC. In the generally excellent PotgreSQL documentation you can find its reference here however i will also try and state a few things about autovaccum which are not in docs but perhaps should be, i will also try to keep it as end-userish as possible. Continue reading

Nginx Module Extension

My new book Nginx Module Extension is now out on all major online retailers. You will find this as a one stop guide to getting familiar with nginx module system and how to install and configure HTTP and 3rd party modules. The unique thing about this book is a chapter on how to write your own nginx module. Open source is all about creating for yourself and others what doesn’t already exist. Hope nginx users and developers will find it useful.

Anti-Caching a better way to do memory management for database systems

I have been confused about this for half a month until i figured this out. So what is Anti-Caching? And why is it needed? How is it different from the traditional buffer-pool system in all the databases today?

Dr. Stonebraker gave a talk where a small part of it talks about “Anti-Caching”. It is supposed to be a better way to use memory with databases dealing in large datasets

Continue reading

Can’t run Java plugin in Chrome for Mac OSX after installing Oracle JDK 7?

If you are using Mac OSX (i am on Lion)  and you just installed Oracle JDK / JRE 7  your Java applets in Chrome will stop working. You will basically be told Chrome does not support Java 7 on the Mac platform. A 64-bit browser (Safari or Firefox, for example) is required to run Java 7 on Mac OS X. 32-bit browsers such as Chrome do not support Java 7 on the Mac platform. Continue reading

Difference between Multi-Threading and Parallel Programming

Since the use of multi-core computers / PCs is common these days, there are more and more parallel programming frameworks coming up. If you use Scala (or Java)  you might have used the AKA framework which is based on Actors. In java 7 there are the Fork/ join APIs.  However you might ask why do we need these , since multithreaded apps are already quite common. If you use Servlets and so on you are automatically using multiple threads and JVM is a beast when it comes to scaling up using threads and utilising multiple cores.  Continue reading

Writing a custom Nginx module – Sample Hello World Module

If you want to write a custom Nginx module, Emiller’s guide is a very good starting point. This article is a wee bit long and you might want to get your hands dirty just to see a full program. In this case you can find this hello world module useful.

I found both of them useful, but the hello world program was  simplistic enough for me to miss some concepts, so i wrote this improved hello word module. Continue reading