mirror of
https://git.envs.net/envs/matrix-conf.git
synced 2025-01-27 08:17:10 -05:00
add note "synapse-clear-state.sh" is replaced by "synapse_auto_compressor"
This commit is contained in:
parent
6c7eec5155
commit
36dcd1def0
@ -1,5 +1,17 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
|
# THIS SCRIPT IS REPLACED BY "synapse_auto_compressor" see:
|
||||||
|
# https://github.com/matrix-org/rust-synapse-compress-state for details.
|
||||||
|
#
|
||||||
|
# run it via:
|
||||||
|
# synapse_auto_compressor -p "user=postgres dbname=matrix host=/var/run/postgresql" -c 500 -n 100
|
||||||
|
#
|
||||||
|
# after all you rooms are processed you can run a:
|
||||||
|
# REINDEX (VERBOSE) DATABASE CONCURRENTLY DATABASENAME
|
||||||
|
# to free your discspace.
|
||||||
|
#
|
||||||
|
###
|
||||||
|
#
|
||||||
# you dont need to stop synapse.
|
# you dont need to stop synapse.
|
||||||
#
|
#
|
||||||
# from: https://jo-so.de/2018-03/Matrix.html#state_groups_stateaufrumen
|
# from: https://jo-so.de/2018-03/Matrix.html#state_groups_stateaufrumen
|
||||||
@ -68,7 +80,8 @@ echo 'Enabling autovacuum on state_groups_state'
|
|||||||
psql -X -q -b -U "$username" -c 'alter table state_groups_state set (autovacuum_enabled = true);' $db
|
psql -X -q -b -U "$username" -c 'alter table state_groups_state set (autovacuum_enabled = true);' $db
|
||||||
|
|
||||||
echo 'Running VACUUM and ANALYZE for state_groups_state ...'
|
echo 'Running VACUUM and ANALYZE for state_groups_state ...'
|
||||||
$time psql -X -q -b -U "$username" -c 'VACUUM FULL ANALYZE state_groups_state' $db
|
#$time psql -X -q -b -U "$username" -c 'VACUUM FULL ANALYZE state_groups_state' $db
|
||||||
|
$time psql -X -q -b -U "$username" -c 'REINDEX (VERBOSE) DATABASE CONCURRENTLY' $db
|
||||||
|
|
||||||
echo "All SQL scripts are in $PWD"
|
echo "All SQL scripts are in $PWD"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user