Code

postgresql plugin: Unregister all writers on shutdown.
authorSebastian Harl <sh@tokkee.org>
Thu, 15 Nov 2012 06:43:02 +0000 (07:43 +0100)
committerSebastian Harl <sh@tokkee.org>
Thu, 15 Nov 2012 06:43:02 +0000 (07:43 +0100)
commit61541f6a451a6a6006542ea05eb97cc163bac4c1
treedf6810f301c36009575f432b77acd1df320413ab
parent18a362183d43f2b539cf7687769c2c771070aa75
postgresql plugin: Unregister all writers on shutdown.

This will make sure that all pending transactions will be committed. Else, the
open transactions would be rolled back by the PostgreSQL backend when closing
the connection.

In order to do so, all database connections are now stored in a plugin-global
array (this will also make further changes possible). Also, a ref-count has
been added to the database object in order to support "deleting" an object
twice when having it in use by a connection doing queries and writes.
src/postgresql.c