An open source profiler that works for tuning business logic on an open source database on Linux

It is very often seen that it is unavoidable to write business logic inside a database. What if you got an open source database like PostgreSQL on Linux that can behave very well with Stored Procedures ? Adding this open source tool called plprofiler to it, makes it much more easy for developers in not only writing them but also in tuning the stored procedures very easily.