Skip to content
This repository was archived by the owner on Jul 8, 2026. It is now read-only.

stream: docs and tutorial for xata clone stream - #37

Merged
divyenduz merged 10 commits into
mainfrom
stream_docs
Sep 8, 2025
Merged

divyenduz merged 10 commits into
mainfrom
stream_docs

Conversation

@divyenduz

@divyenduz divyenduz commented Sep 2, 2025 •

Copy link
Copy Markdown
Member

Docs for https://github.com/xataio/frontend/pull/1383
And a basic tutorial as well.

@github-actions

github-actions Bot commented Sep 2, 2025

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Sep 2, 2025

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Sep 2, 2025

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Sep 2, 2025

Copy link
Copy Markdown

@divyenduz divyenduz changed the title stream: docs for xata clone stream stream: docs and tutorial for xata clone stream Sep 2, 2025
@github-actions

github-actions Bot commented Sep 2, 2025

Copy link
Copy Markdown

Comment thread docs/cli/clone.mdx
Comment thread 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

Copy link
Copy Markdown

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.

Copy link
Copy Markdown
Member Author

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.

Copy link
Copy Markdown

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.

Copy link
Copy Markdown
Member Author

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?

Comment thread docs/cli/clone.mdx Outdated
Comment thread docs/cli/stream.mdx
Comment thread docs/cli/stream.mdx
```
- A PostgreSQL database with:
- Logical replication enabled
- A dedicated replication slot (or permissions to create one)

Copy link
Copy Markdown

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?

Copy link
Copy Markdown
Member Author

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)

Copy link
Copy Markdown

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?

Copy link
Copy Markdown
Member Author

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)"

Comment thread docs/tutorials/streaming-replication.mdx Outdated
Comment thread docs/tutorials/streaming-replication.mdx
Comment thread docs/tutorials/streaming-replication.mdx
Comment thread docs/tutorials/streaming-replication.mdx Outdated
@github-actions

github-actions Bot commented Sep 2, 2025

Copy link
Copy Markdown

Comment thread docs/tutorials/streaming-replication.mdx Outdated
Comment thread docs/tutorials/streaming-replication.mdx Outdated
Comment thread docs/tutorials/streaming-replication.mdx

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
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

@github-actions

github-actions Bot commented Sep 4, 2025

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Sep 4, 2025

Copy link
Copy Markdown

Comment thread docs/cli/clone.mdx
Comment thread docs/cli/stream.mdx
Comment thread docs/cli/stream.mdx
Comment thread docs/cli/stream.mdx
```
- A PostgreSQL database with:
- Logical replication enabled
- A dedicated replication slot (or permissions to create one)

Copy link
Copy Markdown

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?

Comment thread docs/tutorials/streaming-replication.mdx
@github-actions

github-actions Bot commented Sep 8, 2025

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Sep 8, 2025

Copy link
Copy Markdown

@divyenduz
divyenduz merged commit 8ad43d8 into main Sep 8, 2025
1 check passed
@divyenduz
divyenduz deleted the stream_docs branch September 8, 2025 13:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants