[Serdev] postgres module

Jan Janak jan at iptel.org
Mon Jan 26 16:37:57 UTC 2004


Hello Greg,

We are planning to deploy your postgres module on our servers mainly to
stress it a little bit (mysql has been tested enough).

I am thinking about some changes to postgres module and I would like to
check whether they would be fine with you.

- Connection pool -- I would like to implement the same connection pool
  which is now implemented in mysql module. It allows sharing of
  connections with the same URL among modules within the same process.
  That means the number of connections will not grow with the number of
  modules using db anymore.

- Memory management functions -- I've noticed that you have been using
  your own memory management functions that allow to find mem leaks
  easily. I'd like to remove them. I understand that they are good for
  debugging, but they also introduce performance bottleneck which is not
  necessary. Of course I take the responsibility for any memory leaks
  which I might introduce and will fix them immediately.

- Postgres API allows to specify queries in the form of string vectors
  (which means that the sql query buffer will be no more needed). I am
  still studying the API, but it looks like it will fit our needs better
  than MySQL API (which doesn't not allow this and you have to assemble
  the query by yourself before you pass it to the library, which is the
  ugliest part in mysql module now).

Please let me know what do you think about this. I can send you patches
for review before I commit, of course.

We also plan to introduce the database unification into serweb. Once it
is done the two database modules should become fully interchangeable.

  Jan.




More information about the Serdev mailing list