Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Add a Postgres REPLICA IDENTITY to tables that do not have an implicit one. This should allow use of Postgres logical replication. (take 2, now with no added deadlocks!) #16658

Merged
merged 4 commits into from
Dec 4, 2023

Conversation

reivilibre
Copy link
Contributor

Fixes: #16224
Supersedes: #16456, #16647

Base: develop

Original commit schedule, with full messages:

  1. Add ALTER TABLE ... REPLICA IDENTITY ... for individual tables
    We can't combine them into one file as it makes it likely to hit a deadlock

    if Synapse is running, as it only takes one other transaction to access two

    tables in a different order to the schema delta.

  2. Add notes

We can't combine them into one file as it makes it likely to hit a deadlock

if Synapse is running, as it only takes one other transaction to access two

tables in a different order to the schema delta.
Signed-off-by: Olivier Wilkinson (reivilibre) <[email protected]>
@reivilibre reivilibre changed the title Add a Postgres REPLICA IDENTITY to tables that do not have an implicit one. This should allow use of Postgres logical replication. Add a Postgres REPLICA IDENTITY to tables that do not have an implicit one. This should allow use of Postgres logical replication. (take 2, now with no added deadlocks!) Nov 17, 2023
@reivilibre reivilibre marked this pull request as ready for review November 17, 2023 11:59
@reivilibre reivilibre requested a review from a team as a code owner November 17, 2023 11:59
Copy link
Member

@clokep clokep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you split some stuff into separate files. 😄

@reivilibre reivilibre merged commit 51e4e35 into develop Dec 4, 2023
41 checks passed
@reivilibre reivilibre deleted the rei/replica_identities_individual branch December 4, 2023 14:57
DMRobertson pushed a commit that referenced this pull request Dec 5, 2023
This resolves a conflict between
#16658 and
#16652
and should unsad CI.
DMRobertson pushed a commit that referenced this pull request Dec 5, 2023
This reverts two commits:

    0bb8e41
    "Fix postgres schema after dropping old tables (#16730)"

and

    51e4e35
    "Add a Postgres `REPLICA IDENTITY` to tables that do not have an implicit one. This should allow use of Postgres logical replication. (take  2, now with no added deadlocks!) (#16658)"

and also amends the changelog.
@thinkwelltwd
Copy link

Is there some background on why this commit got reverted? I've been waiting with bated breath for weeks on getting it committed.

@DMRobertson
Copy link
Contributor

Sorry, I should have written something in 44377f5. The answer is that this didn't cleanly apply in a staging deployment. I will add context to #16224 and reopen it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants