author | Sebastian Harl <sh@tokkee.org> | |
Thu, 15 Nov 2012 06:43:02 +0000 (07:43 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Thu, 15 Nov 2012 06:43:02 +0000 (07:43 +0100) | ||
commit | 61541f6a451a6a6006542ea05eb97cc163bac4c1 | |
tree | df6810f301c36009575f432b77acd1df320413ab | tree | snapshot |
parent | 18a362183d43f2b539cf7687769c2c771070aa75 | commit | diff |
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.
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 | diff | blob | history |