summary refs log tree commit diff
path: root/synapse/storage/schema/common
diff options
context:
space:
mode:
authorErik Johnston <erikj@matrix.org>2023-11-16 16:57:26 +0000
committerGitHub <noreply@github.com>2023-11-16 16:57:26 +0000
commit4d6b80038588f273a95d8d705aca885dc61768cc (patch)
tree28d50c6de1b24b9536f2ce9e83896f6b9baf00b2 /synapse/storage/schema/common
parentRevert "Add a Postgres `REPLICA IDENTITY` to tables that do not have an impli... (diff)
downloadsynapse-4d6b80038588f273a95d8d705aca885dc61768cc.tar.xz
Revert "Fix test not detecting tables with missing primary keys and missing replica identities, then add more replica identities. (#16647)" (#16652)
This reverts commit 830988ae72d63bbb67d2020a3f221664f3f456ee.
Diffstat (limited to 'synapse/storage/schema/common')
-rw-r--r--synapse/storage/schema/common/delta/83/07_common_replica_identities.sql.postgres30
1 files changed, 0 insertions, 30 deletions
diff --git a/synapse/storage/schema/common/delta/83/07_common_replica_identities.sql.postgres b/synapse/storage/schema/common/delta/83/07_common_replica_identities.sql.postgres
deleted file mode 100644
index 6bdd1f9569..0000000000
--- a/synapse/storage/schema/common/delta/83/07_common_replica_identities.sql.postgres
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright 2023 The Matrix.org Foundation C.I.C
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
--- Annotate some tables in Postgres with a REPLICA IDENTITY.
--- Any table that doesn't have a primary key should be annotated explicitly with
--- a REPLICA IDENTITY so that logical replication can be used.
--- If this is not done, then UPDATE and DELETE statements on those tables
--- will fail if logical replication is in use.
-
-
--- Re-use unique indices already defined on tables as a replica identity.
-ALTER TABLE applied_module_schemas REPLICA IDENTITY USING INDEX applied_module_schemas_module_name_file_key;
-ALTER TABLE applied_schema_deltas REPLICA IDENTITY USING INDEX applied_schema_deltas_version_file_key;
-ALTER TABLE background_updates REPLICA IDENTITY USING INDEX background_updates_uniqueness;
-ALTER TABLE schema_compat_version REPLICA IDENTITY USING INDEX schema_compat_version_lock_key;
-ALTER TABLE schema_version REPLICA IDENTITY USING INDEX schema_version_lock_key;
-
-