diff --git a/AUTHORS.rst b/AUTHORS.rst
index 8396e535e8cc0b8ebfba91b2ecc7f30a9808aeeb..3a457cd9fc1d1aaab0bfb2a53f6dfd55a3a5252e 100644
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -35,3 +35,6 @@ Turned to Dust <dwinslow86 at gmail.com>
 
 Brabo <brabo at riseup.net>
  * Installation instruction fixes
+
+Ivan Shapovalov <intelfx100 at gmail.com>
+ * contrib/systemd: a sample systemd unit file and a logger configuration
diff --git a/CHANGES.rst b/CHANGES.rst
index f0bb973dcf1032bcc0dca162c58a60609860a5fa..65970a89c7be143eddffae55e80d15fc9568be26 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -10,6 +10,8 @@ General:
 * Fix race in caches that occasionally caused some presence updates to be
   dropped - SYN-369.
 * Check server name has not changed on restart.
+* Add a sample systemd unit file and a logger configuration in
+  contrib/systemd. Contributed Ivan Shapovalov.
 
 Federation:
 
diff --git a/UPGRADE.rst b/UPGRADE.rst
index ab327a8136b24638524b2c2fe8debf4a472c6dd8..d98460f643435f5258391e49aa231bd085462f6a 100644
--- a/UPGRADE.rst
+++ b/UPGRADE.rst
@@ -1,4 +1,4 @@
-Upgrading to v0.x.x
+Upgrading to v0.9.0
 ===================
 
 Application services have had a breaking API change in this version.
diff --git a/docs/postgres.rst b/docs/postgres.rst
index 2dcc3caf9e1df5c5ef30b060d81aaf106266e489..19d83911159adeec618866bf0bd39d4e47faccb2 100644
--- a/docs/postgres.rst
+++ b/docs/postgres.rst
@@ -82,13 +82,13 @@ complete, restart synapse.  For instance::
     cp homeserver.db homeserver.db.snapshot
     ./synctl start
 
-Assuming your database config file (as described in the section *Synapse
-config*) is named ``database_config.yaml`` and the SQLite snapshot is at
+Assuming your new config file (as described in the section *Synapse config*)
+is named ``homeserver-postgres.yaml`` and the SQLite snapshot is at
 ``homeserver.db.snapshot`` then simply run::
 
     python scripts/port_from_sqlite_to_postgres.py \
         --sqlite-database homeserver.db.snapshot \
-        --postgres-config database_config.yaml
+        --postgres-config homeserver-postgres.yaml
 
 The flag ``--curses`` displays a coloured curses progress UI.
 
diff --git a/scripts/port_from_sqlite_to_postgres.py b/scripts/port_from_sqlite_to_postgres.py
index f98342db51681016fbcf8f25f8b69ebeb13555c9..e7ed4c309b3336bb89174150889b1ba055b904c3 100755
--- a/scripts/port_from_sqlite_to_postgres.py
+++ b/scripts/port_from_sqlite_to_postgres.py
@@ -106,7 +106,7 @@ class Store(object):
                     try:
                         txn = conn.cursor()
                         return func(
-                            LoggingTransaction(txn, desc, self.database_engine),
+                            LoggingTransaction(txn, desc, self.database_engine, []),
                             *args, **kwargs
                         )
                     except self.database_engine.module.DatabaseError as e:
@@ -378,9 +378,7 @@ class Porter(object):
 
         for i, row in enumerate(rows):
             rows[i] = tuple(
-                self.postgres_store.database_engine.encode_parameter(
-                    conv(j, col)
-                )
+                conv(j, col)
                 for j, col in enumerate(row)
                 if j > 0
             )
@@ -725,6 +723,9 @@ if __name__ == "__main__":
 
     postgres_config = yaml.safe_load(args.postgres_config)
 
+    if "database" in postgres_config:
+        postgres_config = postgres_config["database"]
+
     if "name" not in postgres_config:
         sys.stderr.write("Malformed database config: no 'name'")
         sys.exit(2)
diff --git a/synapse/__init__.py b/synapse/__init__.py
index c89f444f4eb04ccc631e7845763f46cab39ccfa6..18b8ff77592c516077e057f9961e8efbeaa8e704 100644
--- a/synapse/__init__.py
+++ b/synapse/__init__.py
@@ -16,4 +16,4 @@
 """ This is a reference implementation of a Matrix home server.
 """
 
-__version__ = "0.9.0"
+__version__ = "0.9.0-r1"