stream: docs and tutorial for xata clone stream#37
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.
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.
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.
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.
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.
How were we creating a slot if it does not exist? With xata clone stream?
There was a problem hiding this comment.
pgstream does it on init, xata clone stream calls pgstream run --init (which is idempotent)
There was a problem hiding this comment.
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.
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.
| 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.
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.