-
Notifications
You must be signed in to change notification settings - Fork 42
Add support for Neon databases #620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for Neon databases in pgstream by excluding Neon-managed roles from snapshots and fixing a bug where the schema_migrations table was created in the wrong schema. The PR includes comprehensive onboarding documentation for using pgstream with Neon databases.
- Excludes Neon-managed roles (
cloud_admin,neondb_owner,neon_service,neon_superuser) from role snapshots - Fixes schema migrations table creation by using schema-qualified table name with the migrate library instead of relying on search_path
- Adds detailed Neon onboarding guide covering snapshots and replication workflows
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pkg/stream/stream_init.go | Updates migrator to use schema-qualified pgstream.schema_migrations table via URL parameters instead of relying on search_path |
| pkg/snapshot/generator/postgres/schema/pgdumprestore/pg_role_parser.go | Adds exclusion map for Neon-managed roles to prevent them from being included in role snapshots |
| docs/neon.md | Adds comprehensive onboarding guide for Neon databases covering snapshots, replication, privileges, and troubleshooting |
| docs/privileges.md | Adds link to the new Neon onboarding guide |
| README.md | Updates documentation index to include Neon guide |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
ca11c88 to
0b16b43
Compare
Merging this branch will decrease overall coverage
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. |
gulcin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome docs, and so easy to read 🚀
Description
This PR updates pgstream to support Neon databases, adding an onboarding document. Additionally, it resolves an issue with the pgstream initialisation, where the
schema_migrationstable was being created in thepublicschema instead of thepgstreamone, since thesearch_pathwas likely being ignored/overwritten. Instead, the qualified table is provided to the migrator so that it's created in the proper path.Onboarding doc preview link.
Related Issue(s)
Type of Change
Changes Made
Testing