Skip to content

Conversation

@martykulma
Copy link
Contributor

@martykulma martykulma commented Aug 29, 2025

Reintroduces #33322 and changes how PG replication slots are managed.

#33322 exposed a race in slot creation that could result in the permanent slot being visible just long enough to create a temporary slot, and then disappear. This resulted in PG progressing its LSN and MZ detecting the slot was over compacted.

  • replication slots are only created by the snapshot operator
    • permanent replication slot (NOEXPORT_SNAPSHOT) is always created
    • temporary replication slot is always used for snapshot, this only gets created if a snapshot is needed
  • replication operator no longer creates a slot, but still checks for slot existence and terminates any active PID using the slot

Motivation

fixes https://github.com/MaterializeInc/database-issues/issues/7288

Checklist

  • This PR has adequate test coverage / QA involvement has been duly considered. (trigger-ci for additional test/nightly runs)
  • This PR has an associated up-to-date design doc, is a design doc (template), or is sufficiently small to not require a design.
  • If this PR evolves an existing $T ⇔ Proto$T mapping (possibly in a backwards-incompatible way), then it is tagged with a T-proto label.
  • If this PR will require changes to cloud orchestration or tests, there is a companion cloud PR to account for those changes that is tagged with the release-blocker label (example).
  • If this PR includes major user-facing behavior changes, I have pinged the relevant PM to schedule a changelog post.

@martykulma martykulma force-pushed the fix-replication-slot-handling branch from 60a3071 to f860ff5 Compare September 5, 2025 15:50
@martykulma
Copy link
Contributor Author

Rerunning the platform checks in nightly (ran once already, but I've rebased since to pull in removing yugabyte).

@martykulma martykulma marked this pull request as ready for review September 5, 2025 18:22
@martykulma martykulma requested a review from a team as a code owner September 5, 2025 18:22
@martykulma martykulma requested a review from petrosagg September 5, 2025 18:22
@petrosagg petrosagg merged commit 3bfd8e3 into MaterializeInc:main Sep 12, 2025
187 checks passed
@SangJunBak SangJunBak added the self-managed-backport-v25.2 Needs to be backported into the v25.2 self-managed release label Sep 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

self-managed-backport-v25.2-done self-managed-backport-v25.2 Needs to be backported into the v25.2 self-managed release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants