(via api-Hypernova): fix: disable namespace creation and migrations for read-only replica DB#1610
Merged
macroscopeapp[bot] merged 1 commit intohypernova/apm-cleanfrom Feb 7, 2026
Conversation
api-Hypernova
pushed a commit
that referenced
this pull request
Feb 25, 2026
…or read-only replica DB (#1610) <!-- Macroscope (Fix It For Me) template starts here --> ### Macroscope: _Fix It For Me_ - This PR originated from [this comment](https://github.com/xmtp/xmtpd/pull/1589/files#r2776541692) in #1589. - Since auto-merge is on, Macroscope will merge this PR after waiting for checks to pass. - If you'd rather not wait, you can always merge this yourself but **no further action from you is currently needed**. - You can also @mention Macroscope in this PR to request further changes. #### Activity Currently: <!-- Macroscope (Fix It For Me) current status starts here -->_Waiting on checks_<!-- Macroscope (Fix It For Me) current status ends here --> <details> <summary>Previously</summary> <!-- Macroscope (Fix It For Me) previous status starts here --> - Pushed 09d74e4 <!-- Macroscope (Fix It For Me) previous status ends here --> </details> ---- <!-- Macroscope (Fix It For Me) template ends here --> <!-- Macroscope's pull request summary starts here --> <!-- Macroscope will only edit the content between these invisible markers, and the markers themselves will not be visible in the GitHub rendered markdown. --> <!-- If you delete either of the start / end markers from your PR's description, Macroscope will post its summary as a comment. --> ### Disable namespace creation and migrations in `db.NewNamespacedReaderDB` to support read-only replica databases in [pgx.go](https://github.com/xmtp/xmtpd/pull/1610/files#diff-61a5fd647b6319a61b4ad6e44829b0fd29d8f14afefa2700f222127028ce36fc) Update `db.NewNamespacedReaderDB` to pass `doCreateNamespace=false` and `runMigrations=false` to `connectToDB` in [pgx.go](https://github.com/xmtp/xmtpd/pull/1610/files#diff-61a5fd647b6319a61b4ad6e44829b0fd29d8f14afefa2700f222127028ce36fc). #### 📍Where to Start Start at the `db.NewNamespacedReaderDB` constructor in [pgx.go](https://github.com/xmtp/xmtpd/pull/1610/files#diff-61a5fd647b6319a61b4ad6e44829b0fd29d8f14afefa2700f222127028ce36fc) and trace its call to `connectToDB` to review the changed options. ---- <!-- Macroscope's review summary starts here --> <a href="https://app.macroscope.com">Macroscope</a> summarized 09d74e4. <!-- Macroscope's review summary ends here --> <!-- macroscope-ui-refresh --> <!-- Macroscope's pull request summary ends here --> Co-authored-by: macroscopeapp[bot] <170038800+macroscopeapp[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Macroscope: Fix It For Me
Activity
Currently: Auto-merged faaa1a6
Previously
Disable namespace creation and migrations in
db.NewNamespacedReaderDBto support read-only replica databases in pgx.goUpdate
db.NewNamespacedReaderDBto passdoCreateNamespace=falseandrunMigrations=falsetoconnectToDBin pgx.go.📍Where to Start
Start at the
db.NewNamespacedReaderDBconstructor in pgx.go and trace its call toconnectToDBto review the changed options.Macroscope summarized 09d74e4.