Skip to content

Update developer stream docs to point out _setup_sequence(...) in portdb#19675

Merged
MadLittleMods merged 3 commits intodevelopfrom
madlittlemods/19671-stream-portdb-setup-sequence
Apr 9, 2026
Merged

Update developer stream docs to point out _setup_sequence(...) in portdb#19675
MadLittleMods merged 3 commits intodevelopfrom
madlittlemods/19671-stream-portdb-setup-sequence

Conversation

@MadLittleMods
Copy link
Copy Markdown
Contributor

@MadLittleMods MadLittleMods commented Apr 8, 2026

Update developer stream docs to point out _setup_sequence(...) in portdb

Part of #19671

Spawning from discussion in #synapse-dev:matrix.org with roots in #19558 (comment). As trialed/discovered by @turt2live alongside @reivilibre and @clokep ❤️

Why is this necessary?

If you forget to add _setup_sequence(...), you can run into the following error if there is 1 row in SQLite and then you use the portdb script to try to migrate to Postgres (as explained by @reivilibre)

Postgres sequence 'quarantined_media_id_seq' is inconsistent with associated stream position
of 'quarantined_media' in the 'stream_positions' table.

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file. The entry should:
    • Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from EventStore to EventWorkerStore.".
    • Use markdown where necessary, mostly for code blocks.
    • End with either a period (.) or an exclamation mark (!).
    • Start with a capital letter.
    • Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry.
  • Code style is correct (run the linters)

@MadLittleMods MadLittleMods marked this pull request as ready for review April 8, 2026 22:07
@MadLittleMods MadLittleMods requested a review from a team as a code owner April 8, 2026 22:07
Copy link
Copy Markdown
Contributor

@reivilibre reivilibre left a comment

Choose a reason for hiding this comment

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

Thanks!

@MadLittleMods MadLittleMods merged commit f7c8967 into develop Apr 9, 2026
38 checks passed
@MadLittleMods MadLittleMods deleted the madlittlemods/19671-stream-portdb-setup-sequence branch April 9, 2026 14:49
@MadLittleMods
Copy link
Copy Markdown
Contributor Author

Thanks for the review @reivilibre 🦛

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants