Fix bug with read / write connection and inserting into Postgres.
Merge branch '4.2'