matrix-org / rust-synapse-compress-state

A tool to compress some state in a Synapse instance's database
https://pypi.org/project/synapse-auto-compressor/
Apache License 2.0
143 stars 33 forks source link

Should synapse be shut down while running this? #2

Closed turt2live closed 4 years ago

richvdh commented 5 years ago

It should be fine to leave it running.

turt2live commented 5 years ago

including the sql at the end?

richvdh commented 5 years ago

indeed.

To give some more details, the state_groups and state_groups_state tables are append-only: once written to the database, they are never modified. There is therefore no danger of a modification racing against a running synapse. Further, this script makes its changes within atomic transactions, and each transaction should not affect the results from any of the queries that synapse performs.

turt2live commented 5 years ago

That's pretty cool. I'll leave this open as a reminder to someone (probably myself) to add a quick note to the readme about that.

Thanks for the replies!