From 4f9ae7691d9742f128f18ea0b4c620a356ce2ef5 Mon Sep 17 00:00:00 2001 From: David Robertson Date: Tue, 5 Dec 2023 10:29:52 +0000 Subject: [PATCH 1/4] Fix postgres schema after batch_events dropped This resolves a conflict between https://github.com/matrix-org/synapse/pull/16658 and https://github.com/matrix-org/synapse/pull/16652 and should unsad CI. --- .../main/delta/83/10_replica_identity_batch_events.sql.postgres | 1 - 1 file changed, 1 deletion(-) delete mode 100644 synapse/storage/schema/main/delta/83/10_replica_identity_batch_events.sql.postgres diff --git a/synapse/storage/schema/main/delta/83/10_replica_identity_batch_events.sql.postgres b/synapse/storage/schema/main/delta/83/10_replica_identity_batch_events.sql.postgres deleted file mode 100644 index cd4471f4d7c7..000000000000 --- a/synapse/storage/schema/main/delta/83/10_replica_identity_batch_events.sql.postgres +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE batch_events REPLICA IDENTITY USING INDEX chunk_events_event_id; From f8fd043760782a6714650be2e098fa5f24780b72 Mon Sep 17 00:00:00 2001 From: David Robertson Date: Tue, 5 Dec 2023 10:33:12 +0000 Subject: [PATCH 2/4] Changelog --- changelog.d/16730.misc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/16730.misc diff --git a/changelog.d/16730.misc b/changelog.d/16730.misc new file mode 100644 index 000000000000..baee042f2f2c --- /dev/null +++ b/changelog.d/16730.misc @@ -0,0 +1 @@ +Add a Postgres `REPLICA IDENTITY` to tables that do not have an implicit one. This should allow use of Postgres logical replication. \ No newline at end of file From 16b949860041995a8c90e3a62118276b8eb427df Mon Sep 17 00:00:00 2001 From: David Robertson Date: Tue, 5 Dec 2023 10:39:07 +0000 Subject: [PATCH 3/4] And another delta --- .../main/delta/83/10_replica_identity_event_txn_id.sql.postgres | 1 - 1 file changed, 1 deletion(-) delete mode 100644 synapse/storage/schema/main/delta/83/10_replica_identity_event_txn_id.sql.postgres diff --git a/synapse/storage/schema/main/delta/83/10_replica_identity_event_txn_id.sql.postgres b/synapse/storage/schema/main/delta/83/10_replica_identity_event_txn_id.sql.postgres deleted file mode 100644 index a2bacbc96d57..000000000000 --- a/synapse/storage/schema/main/delta/83/10_replica_identity_event_txn_id.sql.postgres +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE event_txn_id REPLICA IDENTITY USING INDEX event_txn_id_event_id; From f5c9b22c7ac001ac1f676f9808fdf5f44620fa4b Mon Sep 17 00:00:00 2001 From: David Robertson Date: Tue, 5 Dec 2023 10:44:48 +0000 Subject: [PATCH 4/4] Not another one? You are joking me. --- .../83/10_replica_identity_insertion_event_edges.sql.postgres | 1 - .../10_replica_identity_insertion_event_extremities.sql.postgres | 1 - .../delta/83/10_replica_identity_insertion_events.sql.postgres | 1 - 3 files changed, 3 deletions(-) delete mode 100644 synapse/storage/schema/main/delta/83/10_replica_identity_insertion_event_edges.sql.postgres delete mode 100644 synapse/storage/schema/main/delta/83/10_replica_identity_insertion_event_extremities.sql.postgres delete mode 100644 synapse/storage/schema/main/delta/83/10_replica_identity_insertion_events.sql.postgres diff --git a/synapse/storage/schema/main/delta/83/10_replica_identity_insertion_event_edges.sql.postgres b/synapse/storage/schema/main/delta/83/10_replica_identity_insertion_event_edges.sql.postgres deleted file mode 100644 index 8322722b1ab1..000000000000 --- a/synapse/storage/schema/main/delta/83/10_replica_identity_insertion_event_edges.sql.postgres +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE insertion_event_edges REPLICA IDENTITY FULL; diff --git a/synapse/storage/schema/main/delta/83/10_replica_identity_insertion_event_extremities.sql.postgres b/synapse/storage/schema/main/delta/83/10_replica_identity_insertion_event_extremities.sql.postgres deleted file mode 100644 index 1816ce5a498d..000000000000 --- a/synapse/storage/schema/main/delta/83/10_replica_identity_insertion_event_extremities.sql.postgres +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE insertion_event_extremities REPLICA IDENTITY USING INDEX insertion_event_extremities_event_id; diff --git a/synapse/storage/schema/main/delta/83/10_replica_identity_insertion_events.sql.postgres b/synapse/storage/schema/main/delta/83/10_replica_identity_insertion_events.sql.postgres deleted file mode 100644 index 1fdbd597c7f1..000000000000 --- a/synapse/storage/schema/main/delta/83/10_replica_identity_insertion_events.sql.postgres +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE insertion_events REPLICA IDENTITY USING INDEX insertion_events_event_id;