mirror of
https://github.com/element-hq/synapse.git
synced 2026-10-22 21:54:03 +00:00
deploy: 66a5f6c400
This commit is contained in:
1 parent
131e5b46b3
commit
6c2f8fac44
4 files changed
+128
-2
No files matched your search
@@ -1631,6 +1631,69 @@ dpkg -i matrix-synapse-py3_1.3.0+stretch1_amd64.deb
|
||||
</code></pre>
|
||||
</li>
|
||||
</ul>
|
||||
<h1 id="upgrading-to-v1600"><a class="header" href="#upgrading-to-v1600">Upgrading to v1.60.0</a></h1>
|
||||
<h2 id="adding-a-new-unique-index-to-state_group_edges-could-fail-if-your-database-is-corrupted"><a class="header" href="#adding-a-new-unique-index-to-state_group_edges-could-fail-if-your-database-is-corrupted">Adding a new unique index to <code>state_group_edges</code> could fail if your database is corrupted</a></h2>
|
||||
<p>This release of Synapse will add a unique index to the <code>state_group_edges</code> table, in order
|
||||
to prevent accidentally introducing duplicate information (for example, because a database
|
||||
backup was restored multiple times).</p>
|
||||
<p>Duplicate rows being present in this table could cause drastic performance problems; see
|
||||
<a href="https://github.com/matrix-org/synapse/issues/11779">issue 11779</a> for more details.</p>
|
||||
<p>If your Synapse database already has had duplicate rows introduced into this table,
|
||||
this could fail, with either of these errors:</p>
|
||||
<p><strong>On Postgres:</strong></p>
|
||||
<pre><code>synapse.storage.background_updates - 623 - INFO - background_updates-0 - Adding index state_group_edges_unique_idx to state_group_edges
|
||||
synapse.storage.background_updates - 282 - ERROR - background_updates-0 - Error doing update
|
||||
...
|
||||
psycopg2.errors.UniqueViolation: could not create unique index "state_group_edges_unique_idx"
|
||||
DETAIL: Key (state_group, prev_state_group)=(2, 1) is duplicated.
|
||||
</code></pre>
|
||||
<p>(The numbers may be different.)</p>
|
||||
<p><strong>On SQLite:</strong></p>
|
||||
<pre><code>synapse.storage.background_updates - 623 - INFO - background_updates-0 - Adding index state_group_edges_unique_idx to state_group_edges
|
||||
synapse.storage.background_updates - 282 - ERROR - background_updates-0 - Error doing update
|
||||
...
|
||||
sqlite3.IntegrityError: UNIQUE constraint failed: state_group_edges.state_group, state_group_edges.prev_state_group
|
||||
</code></pre>
|
||||
<details>
|
||||
<summary><b>Expand this section for steps to resolve this problem</b></summary>
|
||||
<h3 id="on-postgres"><a class="header" href="#on-postgres">On Postgres</a></h3>
|
||||
<p>Connect to your database with <code>psql</code>.</p>
|
||||
<pre><code class="language-sql">BEGIN;
|
||||
DELETE FROM state_group_edges WHERE (ctid, state_group, prev_state_group) IN (
|
||||
SELECT row_id, state_group, prev_state_group
|
||||
FROM (
|
||||
SELECT
|
||||
ctid AS row_id,
|
||||
MIN(ctid) OVER (PARTITION BY state_group, prev_state_group) AS min_row_id,
|
||||
state_group,
|
||||
prev_state_group
|
||||
FROM state_group_edges
|
||||
) AS t1
|
||||
WHERE row_id <> min_row_id
|
||||
);
|
||||
COMMIT;
|
||||
</code></pre>
|
||||
<h3 id="on-sqlite"><a class="header" href="#on-sqlite">On SQLite</a></h3>
|
||||
<p>At the command-line, use <code>sqlite3 path/to/your-homeserver-database.db</code>:</p>
|
||||
<pre><code class="language-sql">BEGIN;
|
||||
DELETE FROM state_group_edges WHERE (rowid, state_group, prev_state_group) IN (
|
||||
SELECT row_id, state_group, prev_state_group
|
||||
FROM (
|
||||
SELECT
|
||||
rowid AS row_id,
|
||||
MIN(rowid) OVER (PARTITION BY state_group, prev_state_group) AS min_row_id,
|
||||
state_group,
|
||||
prev_state_group
|
||||
FROM state_group_edges
|
||||
)
|
||||
WHERE row_id <> min_row_id
|
||||
);
|
||||
COMMIT;
|
||||
</code></pre>
|
||||
<h3 id="for-more-details"><a class="header" href="#for-more-details">For more details</a></h3>
|
||||
<p><a href="https://github.com/matrix-org/synapse/issues/11779#issuecomment-1131545970">This comment on issue 11779</a>
|
||||
has queries that can be used to check a database for this problem in advance.</p>
|
||||
</details>
|
||||
<h1 id="upgrading-to-v1590"><a class="header" href="#upgrading-to-v1590">Upgrading to v1.59.0</a></h1>
|
||||
<h2 id="device-name-lookup-over-federation-has-been-disabled-by-default"><a class="header" href="#device-name-lookup-over-federation-has-been-disabled-by-default">Device name lookup over federation has been disabled by default</a></h2>
|
||||
<p>The names of user devices are no longer visible to users on other homeservers by default.
|
||||
|
||||
@@ -1 +1 @@
|
||||
Object.assign(window.search, {"doc_urls":["welcome_and_overview.html#introduction","welcome_and_overview.html#installing-and-using-synapse","welcome_and_overview.html#developing-on-synapse","welcome_and_overview.html#donating-to-synapse-development","welcome_and_overview.html#reporting-a-security-vulnerability","setup/installation.html#installation-instructions","setup/installation.html#choosing-your-server-name","setup/installation.html#installing-synapse","setup/installation.html#prebuilt-packages","setup/installation.html#installing-as-a-python-module-from-pypi","setup/installation.html#setting-up-synapse","setup/installation.html#using-postgresql","setup/installation.html#tls-certificates","setup/installation.html#client-well-known-uri","setup/installation.html#email","setup/installation.html#registering-a-user","setup/installation.html#setting-up-a-turn-server","setup/installation.html#url-previews","setup/installation.html#troubleshooting-installation","postgres.html#using-postgres","postgres.html#install-postgres-client-libraries","postgres.html#set-up-database","postgres.html#synapse-config","postgres.html#tuning-postgres","postgres.html#porting-from-sqlite","postgres.html#overview","postgres.html#using-the-port-script","postgres.html#troubleshooting","postgres.html#alternative-auth-methods","postgres.html#fixing-incorrect-collate-or-ctype","postgres.html#fixing-inconsistent-sequences-error","reverse_proxy.html#using-a-reverse-proxy-with-synapse","reverse_proxy.html#homeserver-configuration","reverse_proxy.html#reverse-proxy-configuration-examples","reverse_proxy.html#nginx","reverse_proxy.html#caddy-v1","reverse_proxy.html#caddy-v2","reverse_proxy.html#apache","reverse_proxy.html#haproxy","reverse_proxy.html#relayd","reverse_proxy.html#health-check-endpoint","reverse_proxy.html#synapse-administration-endpoints","setup/forward_proxy.html#using-a-forward-proxy-with-synapse","setup/forward_proxy.html#configure","setup/forward_proxy.html#connection-types","setup/forward_proxy.html#troubleshooting","turn-howto.html#overview","turn-howto.html#requirements","turn-howto.html#coturn-setup","turn-howto.html#initial-installation","turn-howto.html#configuration","turn-howto.html#synapse-setup","turn-howto.html#troubleshooting","delegate.html#delegation-of-incoming-federation-traffic","delegate.html#well-known-delegation","delegate.html#external-server","delegate.html#serving-a-well-knownmatrixserver-file-with-synapse","delegate.html#srv-dns-record-delegation","delegate.html#delegation-faq","delegate.html#when-do-i-need-delegation","delegate.html#should-i-use-a-reverse-proxy-for-federation-traffic","upgrade.html#upgrading-synapse","upgrade.html#rolling-back-to-older-versions","upgrade.html#upgrading-to-v1590","upgrade.html#device-name-lookup-over-federation-has-been-disabled-by-default","upgrade.html#deprecation-of-the-synapseappappservice-and-synapseappuser_dir-worker-application-types","upgrade.html#upgrading-to-v1580","upgrade.html#groupscommunities-feature-has-been-disabled-by-default","upgrade.html#upgrading-to-v1570","upgrade.html#changes-to-database-schema-for-application-services","upgrade.html#upgrading-to-v1560","upgrade.html#open-registration-without-verification-is-now-disabled-by-default","upgrade.html#groupscommunities-feature-has-been-deprecated","upgrade.html#change-in-behaviour-for-postgresql-databases-with-unsafe-locale","upgrade.html#upgrading-to-v1550","upgrade.html#synctl-script-has-been-moved","upgrade.html#compatibility-dropped-for-mjolnir-131-and-earlier","upgrade.html#upgrading-to-v1540","upgrade.html#legacy-structured-logging-configuration-removal","upgrade.html#upgrading-to-v1530","upgrade.html#dropping-support-for-webclient-listeners-and-non-https-web_client_location","upgrade.html#stablisation-of-msc3231","upgrade.html#time-based-cache-expiry-is-now-enabled-by-default","upgrade.html#deprecation-of-capability-orgmatrixmsc3283","upgrade.html#removal-of-user_may_create_room_with_invites","upgrade.html#upgrading-to-v1520","upgrade.html#twisted-security-release","upgrade.html#upgrading-to-v1510","upgrade.html#deprecation-of-webclient-listeners-and-non-https-web_client_location","upgrade.html#upgrading-to-v1500","upgrade.html#dropping-support-for-old-python-and-postgres-versions","upgrade.html#upgrading-to-v1470","upgrade.html#removal-of-old-room-admin-api","upgrade.html#deprecation-of-the-user_may_create_room_with_invites-module-callback","upgrade.html#upgrading-to-v1450","upgrade.html#changes-required-to-media-storage-provider-modules-when-reading-from-the-synapse-configuration-object","upgrade.html#upgrading-to-v1440","upgrade.html#the-url-preview-cache-is-no-longer-mirrored-to-storage-providers","upgrade.html#upgrading-to-v1430","upgrade.html#the-spaces-summary-apis-can-now-be-handled-by-workers","upgrade.html#upgrading-to-v1420","upgrade.html#removal-of-old-room-admin-api-1","upgrade.html#user-interactive-authentication-fallback-templates-can-now-display-errors","upgrade.html#removaLine truncated
|
||||
Object.assign(window.search, {"doc_urls":["welcome_and_overview.html#introduction","welcome_and_overview.html#installing-and-using-synapse","welcome_and_overview.html#developing-on-synapse","welcome_and_overview.html#donating-to-synapse-development","welcome_and_overview.html#reporting-a-security-vulnerability","setup/installation.html#installation-instructions","setup/installation.html#choosing-your-server-name","setup/installation.html#installing-synapse","setup/installation.html#prebuilt-packages","setup/installation.html#installing-as-a-python-module-from-pypi","setup/installation.html#setting-up-synapse","setup/installation.html#using-postgresql","setup/installation.html#tls-certificates","setup/installation.html#client-well-known-uri","setup/installation.html#email","setup/installation.html#registering-a-user","setup/installation.html#setting-up-a-turn-server","setup/installation.html#url-previews","setup/installation.html#troubleshooting-installation","postgres.html#using-postgres","postgres.html#install-postgres-client-libraries","postgres.html#set-up-database","postgres.html#synapse-config","postgres.html#tuning-postgres","postgres.html#porting-from-sqlite","postgres.html#overview","postgres.html#using-the-port-script","postgres.html#troubleshooting","postgres.html#alternative-auth-methods","postgres.html#fixing-incorrect-collate-or-ctype","postgres.html#fixing-inconsistent-sequences-error","reverse_proxy.html#using-a-reverse-proxy-with-synapse","reverse_proxy.html#homeserver-configuration","reverse_proxy.html#reverse-proxy-configuration-examples","reverse_proxy.html#nginx","reverse_proxy.html#caddy-v1","reverse_proxy.html#caddy-v2","reverse_proxy.html#apache","reverse_proxy.html#haproxy","reverse_proxy.html#relayd","reverse_proxy.html#health-check-endpoint","reverse_proxy.html#synapse-administration-endpoints","setup/forward_proxy.html#using-a-forward-proxy-with-synapse","setup/forward_proxy.html#configure","setup/forward_proxy.html#connection-types","setup/forward_proxy.html#troubleshooting","turn-howto.html#overview","turn-howto.html#requirements","turn-howto.html#coturn-setup","turn-howto.html#initial-installation","turn-howto.html#configuration","turn-howto.html#synapse-setup","turn-howto.html#troubleshooting","delegate.html#delegation-of-incoming-federation-traffic","delegate.html#well-known-delegation","delegate.html#external-server","delegate.html#serving-a-well-knownmatrixserver-file-with-synapse","delegate.html#srv-dns-record-delegation","delegate.html#delegation-faq","delegate.html#when-do-i-need-delegation","delegate.html#should-i-use-a-reverse-proxy-for-federation-traffic","upgrade.html#upgrading-synapse","upgrade.html#rolling-back-to-older-versions","upgrade.html#upgrading-to-v1600","upgrade.html#adding-a-new-unique-index-to-state_group_edges-could-fail-if-your-database-is-corrupted","upgrade.html#on-postgres","upgrade.html#on-sqlite","upgrade.html#for-more-details","upgrade.html#upgrading-to-v1590","upgrade.html#device-name-lookup-over-federation-has-been-disabled-by-default","upgrade.html#deprecation-of-the-synapseappappservice-and-synapseappuser_dir-worker-application-types","upgrade.html#upgrading-to-v1580","upgrade.html#groupscommunities-feature-has-been-disabled-by-default","upgrade.html#upgrading-to-v1570","upgrade.html#changes-to-database-schema-for-application-services","upgrade.html#upgrading-to-v1560","upgrade.html#open-registration-without-verification-is-now-disabled-by-default","upgrade.html#groupscommunities-feature-has-been-deprecated","upgrade.html#change-in-behaviour-for-postgresql-databases-with-unsafe-locale","upgrade.html#upgrading-to-v1550","upgrade.html#synctl-script-has-been-moved","upgrade.html#compatibility-dropped-for-mjolnir-131-and-earlier","upgrade.html#upgrading-to-v1540","upgrade.html#legacy-structured-logging-configuration-removal","upgrade.html#upgrading-to-v1530","upgrade.html#dropping-support-for-webclient-listeners-and-non-https-web_client_location","upgrade.html#stablisation-of-msc3231","upgrade.html#time-based-cache-expiry-is-now-enabled-by-default","upgrade.html#deprecation-of-capability-orgmatrixmsc3283","upgrade.html#removal-of-user_may_create_room_with_invites","upgrade.html#upgrading-to-v1520","upgrade.html#twisted-security-release","upgrade.html#upgrading-to-v1510","upgrade.html#deprecation-of-webclient-listeners-and-non-https-web_client_location","upgrade.html#upgrading-to-v1500","upgrade.html#dropping-support-for-old-python-and-postgres-versions","upgrade.html#upgrading-to-v1470","upgrade.html#removal-of-old-room-admin-api","upgrade.html#deprecation-of-the-user_may_create_room_with_invites-module-callback","upgrade.html#upgrading-to-v1450","upgrade.html#changes-required-to-media-storage-provider-modules-when-reading-from-the-synapse-configuration-object","upgrade.html#upgrading-to-v1440","upgrade.html#the-url-preview-cache-is-no-longer-mirrored-to-storage-providers","upgrade.html#upgrading-to-v1430","upgrade.html#the-spaces-summary-apis-Line truncated
|
||||
@@ -1 +1 @@
|
||||
{"doc_urls":["welcome_and_overview.html#introduction","welcome_and_overview.html#installing-and-using-synapse","welcome_and_overview.html#developing-on-synapse","welcome_and_overview.html#donating-to-synapse-development","welcome_and_overview.html#reporting-a-security-vulnerability","setup/installation.html#installation-instructions","setup/installation.html#choosing-your-server-name","setup/installation.html#installing-synapse","setup/installation.html#prebuilt-packages","setup/installation.html#installing-as-a-python-module-from-pypi","setup/installation.html#setting-up-synapse","setup/installation.html#using-postgresql","setup/installation.html#tls-certificates","setup/installation.html#client-well-known-uri","setup/installation.html#email","setup/installation.html#registering-a-user","setup/installation.html#setting-up-a-turn-server","setup/installation.html#url-previews","setup/installation.html#troubleshooting-installation","postgres.html#using-postgres","postgres.html#install-postgres-client-libraries","postgres.html#set-up-database","postgres.html#synapse-config","postgres.html#tuning-postgres","postgres.html#porting-from-sqlite","postgres.html#overview","postgres.html#using-the-port-script","postgres.html#troubleshooting","postgres.html#alternative-auth-methods","postgres.html#fixing-incorrect-collate-or-ctype","postgres.html#fixing-inconsistent-sequences-error","reverse_proxy.html#using-a-reverse-proxy-with-synapse","reverse_proxy.html#homeserver-configuration","reverse_proxy.html#reverse-proxy-configuration-examples","reverse_proxy.html#nginx","reverse_proxy.html#caddy-v1","reverse_proxy.html#caddy-v2","reverse_proxy.html#apache","reverse_proxy.html#haproxy","reverse_proxy.html#relayd","reverse_proxy.html#health-check-endpoint","reverse_proxy.html#synapse-administration-endpoints","setup/forward_proxy.html#using-a-forward-proxy-with-synapse","setup/forward_proxy.html#configure","setup/forward_proxy.html#connection-types","setup/forward_proxy.html#troubleshooting","turn-howto.html#overview","turn-howto.html#requirements","turn-howto.html#coturn-setup","turn-howto.html#initial-installation","turn-howto.html#configuration","turn-howto.html#synapse-setup","turn-howto.html#troubleshooting","delegate.html#delegation-of-incoming-federation-traffic","delegate.html#well-known-delegation","delegate.html#external-server","delegate.html#serving-a-well-knownmatrixserver-file-with-synapse","delegate.html#srv-dns-record-delegation","delegate.html#delegation-faq","delegate.html#when-do-i-need-delegation","delegate.html#should-i-use-a-reverse-proxy-for-federation-traffic","upgrade.html#upgrading-synapse","upgrade.html#rolling-back-to-older-versions","upgrade.html#upgrading-to-v1590","upgrade.html#device-name-lookup-over-federation-has-been-disabled-by-default","upgrade.html#deprecation-of-the-synapseappappservice-and-synapseappuser_dir-worker-application-types","upgrade.html#upgrading-to-v1580","upgrade.html#groupscommunities-feature-has-been-disabled-by-default","upgrade.html#upgrading-to-v1570","upgrade.html#changes-to-database-schema-for-application-services","upgrade.html#upgrading-to-v1560","upgrade.html#open-registration-without-verification-is-now-disabled-by-default","upgrade.html#groupscommunities-feature-has-been-deprecated","upgrade.html#change-in-behaviour-for-postgresql-databases-with-unsafe-locale","upgrade.html#upgrading-to-v1550","upgrade.html#synctl-script-has-been-moved","upgrade.html#compatibility-dropped-for-mjolnir-131-and-earlier","upgrade.html#upgrading-to-v1540","upgrade.html#legacy-structured-logging-configuration-removal","upgrade.html#upgrading-to-v1530","upgrade.html#dropping-support-for-webclient-listeners-and-non-https-web_client_location","upgrade.html#stablisation-of-msc3231","upgrade.html#time-based-cache-expiry-is-now-enabled-by-default","upgrade.html#deprecation-of-capability-orgmatrixmsc3283","upgrade.html#removal-of-user_may_create_room_with_invites","upgrade.html#upgrading-to-v1520","upgrade.html#twisted-security-release","upgrade.html#upgrading-to-v1510","upgrade.html#deprecation-of-webclient-listeners-and-non-https-web_client_location","upgrade.html#upgrading-to-v1500","upgrade.html#dropping-support-for-old-python-and-postgres-versions","upgrade.html#upgrading-to-v1470","upgrade.html#removal-of-old-room-admin-api","upgrade.html#deprecation-of-the-user_may_create_room_with_invites-module-callback","upgrade.html#upgrading-to-v1450","upgrade.html#changes-required-to-media-storage-provider-modules-when-reading-from-the-synapse-configuration-object","upgrade.html#upgrading-to-v1440","upgrade.html#the-url-preview-cache-is-no-longer-mirrored-to-storage-providers","upgrade.html#upgrading-to-v1430","upgrade.html#the-spaces-summary-apis-can-now-be-handled-by-workers","upgrade.html#upgrading-to-v1420","upgrade.html#removal-of-old-room-admin-api-1","upgrade.html#user-interactive-authentication-fallback-templates-can-now-display-errors","upgrade.html#removal-of-out-of-date-email-pusherLine truncated
|
||||
{"doc_urls":["welcome_and_overview.html#introduction","welcome_and_overview.html#installing-and-using-synapse","welcome_and_overview.html#developing-on-synapse","welcome_and_overview.html#donating-to-synapse-development","welcome_and_overview.html#reporting-a-security-vulnerability","setup/installation.html#installation-instructions","setup/installation.html#choosing-your-server-name","setup/installation.html#installing-synapse","setup/installation.html#prebuilt-packages","setup/installation.html#installing-as-a-python-module-from-pypi","setup/installation.html#setting-up-synapse","setup/installation.html#using-postgresql","setup/installation.html#tls-certificates","setup/installation.html#client-well-known-uri","setup/installation.html#email","setup/installation.html#registering-a-user","setup/installation.html#setting-up-a-turn-server","setup/installation.html#url-previews","setup/installation.html#troubleshooting-installation","postgres.html#using-postgres","postgres.html#install-postgres-client-libraries","postgres.html#set-up-database","postgres.html#synapse-config","postgres.html#tuning-postgres","postgres.html#porting-from-sqlite","postgres.html#overview","postgres.html#using-the-port-script","postgres.html#troubleshooting","postgres.html#alternative-auth-methods","postgres.html#fixing-incorrect-collate-or-ctype","postgres.html#fixing-inconsistent-sequences-error","reverse_proxy.html#using-a-reverse-proxy-with-synapse","reverse_proxy.html#homeserver-configuration","reverse_proxy.html#reverse-proxy-configuration-examples","reverse_proxy.html#nginx","reverse_proxy.html#caddy-v1","reverse_proxy.html#caddy-v2","reverse_proxy.html#apache","reverse_proxy.html#haproxy","reverse_proxy.html#relayd","reverse_proxy.html#health-check-endpoint","reverse_proxy.html#synapse-administration-endpoints","setup/forward_proxy.html#using-a-forward-proxy-with-synapse","setup/forward_proxy.html#configure","setup/forward_proxy.html#connection-types","setup/forward_proxy.html#troubleshooting","turn-howto.html#overview","turn-howto.html#requirements","turn-howto.html#coturn-setup","turn-howto.html#initial-installation","turn-howto.html#configuration","turn-howto.html#synapse-setup","turn-howto.html#troubleshooting","delegate.html#delegation-of-incoming-federation-traffic","delegate.html#well-known-delegation","delegate.html#external-server","delegate.html#serving-a-well-knownmatrixserver-file-with-synapse","delegate.html#srv-dns-record-delegation","delegate.html#delegation-faq","delegate.html#when-do-i-need-delegation","delegate.html#should-i-use-a-reverse-proxy-for-federation-traffic","upgrade.html#upgrading-synapse","upgrade.html#rolling-back-to-older-versions","upgrade.html#upgrading-to-v1600","upgrade.html#adding-a-new-unique-index-to-state_group_edges-could-fail-if-your-database-is-corrupted","upgrade.html#on-postgres","upgrade.html#on-sqlite","upgrade.html#for-more-details","upgrade.html#upgrading-to-v1590","upgrade.html#device-name-lookup-over-federation-has-been-disabled-by-default","upgrade.html#deprecation-of-the-synapseappappservice-and-synapseappuser_dir-worker-application-types","upgrade.html#upgrading-to-v1580","upgrade.html#groupscommunities-feature-has-been-disabled-by-default","upgrade.html#upgrading-to-v1570","upgrade.html#changes-to-database-schema-for-application-services","upgrade.html#upgrading-to-v1560","upgrade.html#open-registration-without-verification-is-now-disabled-by-default","upgrade.html#groupscommunities-feature-has-been-deprecated","upgrade.html#change-in-behaviour-for-postgresql-databases-with-unsafe-locale","upgrade.html#upgrading-to-v1550","upgrade.html#synctl-script-has-been-moved","upgrade.html#compatibility-dropped-for-mjolnir-131-and-earlier","upgrade.html#upgrading-to-v1540","upgrade.html#legacy-structured-logging-configuration-removal","upgrade.html#upgrading-to-v1530","upgrade.html#dropping-support-for-webclient-listeners-and-non-https-web_client_location","upgrade.html#stablisation-of-msc3231","upgrade.html#time-based-cache-expiry-is-now-enabled-by-default","upgrade.html#deprecation-of-capability-orgmatrixmsc3283","upgrade.html#removal-of-user_may_create_room_with_invites","upgrade.html#upgrading-to-v1520","upgrade.html#twisted-security-release","upgrade.html#upgrading-to-v1510","upgrade.html#deprecation-of-webclient-listeners-and-non-https-web_client_location","upgrade.html#upgrading-to-v1500","upgrade.html#dropping-support-for-old-python-and-postgres-versions","upgrade.html#upgrading-to-v1470","upgrade.html#removal-of-old-room-admin-api","upgrade.html#deprecation-of-the-user_may_create_room_with_invites-module-callback","upgrade.html#upgrading-to-v1450","upgrade.html#changes-required-to-media-storage-provider-modules-when-reading-from-the-synapse-configuration-object","upgrade.html#upgrading-to-v1440","upgrade.html#the-url-preview-cache-is-no-longer-mirrored-to-storage-providers","upgrade.html#upgrading-to-v1430","upgrade.html#the-spaces-summary-apis-can-now-be-handled-by-workersLine truncated
|
||||
@@ -232,6 +232,69 @@ dpkg -i matrix-synapse-py3_1.3.0+stretch1_amd64.deb
|
||||
</code></pre>
|
||||
</li>
|
||||
</ul>
|
||||
<h1 id="upgrading-to-v1600"><a class="header" href="#upgrading-to-v1600">Upgrading to v1.60.0</a></h1>
|
||||
<h2 id="adding-a-new-unique-index-to-state_group_edges-could-fail-if-your-database-is-corrupted"><a class="header" href="#adding-a-new-unique-index-to-state_group_edges-could-fail-if-your-database-is-corrupted">Adding a new unique index to <code>state_group_edges</code> could fail if your database is corrupted</a></h2>
|
||||
<p>This release of Synapse will add a unique index to the <code>state_group_edges</code> table, in order
|
||||
to prevent accidentally introducing duplicate information (for example, because a database
|
||||
backup was restored multiple times).</p>
|
||||
<p>Duplicate rows being present in this table could cause drastic performance problems; see
|
||||
<a href="https://github.com/matrix-org/synapse/issues/11779">issue 11779</a> for more details.</p>
|
||||
<p>If your Synapse database already has had duplicate rows introduced into this table,
|
||||
this could fail, with either of these errors:</p>
|
||||
<p><strong>On Postgres:</strong></p>
|
||||
<pre><code>synapse.storage.background_updates - 623 - INFO - background_updates-0 - Adding index state_group_edges_unique_idx to state_group_edges
|
||||
synapse.storage.background_updates - 282 - ERROR - background_updates-0 - Error doing update
|
||||
...
|
||||
psycopg2.errors.UniqueViolation: could not create unique index "state_group_edges_unique_idx"
|
||||
DETAIL: Key (state_group, prev_state_group)=(2, 1) is duplicated.
|
||||
</code></pre>
|
||||
<p>(The numbers may be different.)</p>
|
||||
<p><strong>On SQLite:</strong></p>
|
||||
<pre><code>synapse.storage.background_updates - 623 - INFO - background_updates-0 - Adding index state_group_edges_unique_idx to state_group_edges
|
||||
synapse.storage.background_updates - 282 - ERROR - background_updates-0 - Error doing update
|
||||
...
|
||||
sqlite3.IntegrityError: UNIQUE constraint failed: state_group_edges.state_group, state_group_edges.prev_state_group
|
||||
</code></pre>
|
||||
<details>
|
||||
<summary><b>Expand this section for steps to resolve this problem</b></summary>
|
||||
<h3 id="on-postgres"><a class="header" href="#on-postgres">On Postgres</a></h3>
|
||||
<p>Connect to your database with <code>psql</code>.</p>
|
||||
<pre><code class="language-sql">BEGIN;
|
||||
DELETE FROM state_group_edges WHERE (ctid, state_group, prev_state_group) IN (
|
||||
SELECT row_id, state_group, prev_state_group
|
||||
FROM (
|
||||
SELECT
|
||||
ctid AS row_id,
|
||||
MIN(ctid) OVER (PARTITION BY state_group, prev_state_group) AS min_row_id,
|
||||
state_group,
|
||||
prev_state_group
|
||||
FROM state_group_edges
|
||||
) AS t1
|
||||
WHERE row_id <> min_row_id
|
||||
);
|
||||
COMMIT;
|
||||
</code></pre>
|
||||
<h3 id="on-sqlite"><a class="header" href="#on-sqlite">On SQLite</a></h3>
|
||||
<p>At the command-line, use <code>sqlite3 path/to/your-homeserver-database.db</code>:</p>
|
||||
<pre><code class="language-sql">BEGIN;
|
||||
DELETE FROM state_group_edges WHERE (rowid, state_group, prev_state_group) IN (
|
||||
SELECT row_id, state_group, prev_state_group
|
||||
FROM (
|
||||
SELECT
|
||||
rowid AS row_id,
|
||||
MIN(rowid) OVER (PARTITION BY state_group, prev_state_group) AS min_row_id,
|
||||
state_group,
|
||||
prev_state_group
|
||||
FROM state_group_edges
|
||||
)
|
||||
WHERE row_id <> min_row_id
|
||||
);
|
||||
COMMIT;
|
||||
</code></pre>
|
||||
<h3 id="for-more-details"><a class="header" href="#for-more-details">For more details</a></h3>
|
||||
<p><a href="https://github.com/matrix-org/synapse/issues/11779#issuecomment-1131545970">This comment on issue 11779</a>
|
||||
has queries that can be used to check a database for this problem in advance.</p>
|
||||
</details>
|
||||
<h1 id="upgrading-to-v1590"><a class="header" href="#upgrading-to-v1590">Upgrading to v1.59.0</a></h1>
|
||||
<h2 id="device-name-lookup-over-federation-has-been-disabled-by-default"><a class="header" href="#device-name-lookup-over-federation-has-been-disabled-by-default">Device name lookup over federation has been disabled by default</a></h2>
|
||||
<p>The names of user devices are no longer visible to users on other homeservers by default.
|
||||
|
||||
Reference in new issue
Block a user