-
Notifications
You must be signed in to change notification settings - Fork 0
stream: docs and tutorial for xata clone stream #37
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
|
📖 Docs Preview Preview URL: https://xata.io/next/preview-path?path=/docs-preview/xataio:stream_docs/ |
|
📖 Docs Preview Preview URL: https://xata.io/next/preview-path?path=/docs-preview/xataio:stream_docs/ |
|
📖 Docs Preview Preview URL: https://xata.io/next/preview-path?path=/docs-preview/xataio:stream_docs/ |
|
📖 Docs Preview Preview URL: https://xata.io/next/preview-path?path=/docs-preview/xataio:stream_docs/ |
|
📖 Docs Preview Preview URL: https://xata.io/next/preview-path?path=/docs-preview/xataio:stream_docs/ |
docs/cli/clone.mdx
Outdated
| - `--branch`: Branch ID | ||
| - `--filter-tables`: Tables to filter (default: _._) | ||
| - `--validation-mode`: Anonymization validation mode, strict implies that all tables and columns should be specified (strict|relaxed|prompt, default: prompt) | ||
| - `--role`: Postgres role to use for streaming |
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.
Should we state this role, should have at least REPLICATION privilege? Or some warning not every role can be selected for this.
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.
Updated the docs to add a note (and added it to the CLI --help)
- `--role`: Postgres role to use for streaming (it should have atleast REPLICATION privilege)
some warning
That's a good idea, but I think it should come from pgstream, @eminano wdyt?, if we use a role that doesn't have enough privileges, pgstream should terminate gracefully.
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.
I haven't tested, but I would expect this to fail if the role doesn't work for replication. However, the snapshot would succeed.
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.
Maybe it should check that upfront and fail early?
| ``` | ||
| - A PostgreSQL database with: | ||
| - Logical replication enabled | ||
| - A dedicated replication slot (or permissions to create one) |
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.
How were we creating a slot if it does not exist? With xata clone stream?
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.
pgstream does it on init, xata clone stream calls pgstream run --init (which is idempotent)
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.
Should we make it clear here, we get this covered basically so they don't need to go ahead an create a slot?
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.
Made it so
"- Role with permissions to create a replication slow (xata clone stream command does that automatically)"
|
📖 Docs Preview Preview URL: https://xata.io/next/preview-path?path=/docs-preview/xataio:stream_docs/ |
|
|
||
| The process will resume from where it left off, catching up with any changes that occurred during the downtime. | ||
|
|
||
| If you terminate the `xata clone stream` process and do not wish to run streaming replication again. Clean up the replication slot and |
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.
| If you terminate the `xata clone stream` process and do not wish to run streaming replication again. Clean up the replication slot and | |
| If you terminate the `xata clone stream` process and do not wish to run streaming replication again, clean up the replication slot and |
|
📖 Docs Preview Preview URL: https://xata.io/next/preview-path?path=/docs-preview/xataio:stream_docs/ |
|
📖 Docs Preview Preview URL: https://xata.io/next/preview-path?path=/docs-preview/xataio:stream_docs/ |
| ``` | ||
| - A PostgreSQL database with: | ||
| - Logical replication enabled | ||
| - A dedicated replication slot (or permissions to create one) |
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.
Should we make it clear here, we get this covered basically so they don't need to go ahead an create a slot?
|
📖 Docs Preview Preview URL: https://xata.io/next/preview-path?path=/docs-preview/xataio:stream_docs/ |
|
📖 Docs Preview Preview URL: https://xata.io/next/preview-path?path=/docs-preview/xataio:stream_docs/ |
Docs for https://github.com/xataio/frontend/pull/1383
And a basic tutorial as well.