diff --git a/AUTHORS.rst b/AUTHORS.rst index 8396e535e..3a457cd9f 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -35,3 +35,6 @@ Turned to Dust Brabo * Installation instruction fixes + +Ivan Shapovalov + * contrib/systemd: a sample systemd unit file and a logger configuration diff --git a/CHANGES.rst b/CHANGES.rst index f0bb973dc..65970a89c 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 ab327a813..d98460f64 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 2dcc3caf9..19d839111 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 f98342db5..e7ed4c309 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 c89f444f4..18b8ff775 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"