Skip to content

Conversation

@divyenduz
Copy link
Contributor

@divyenduz divyenduz commented Sep 2, 2025

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

@github-actions
Copy link

github-actions bot commented Sep 2, 2025

@github-actions
Copy link

github-actions bot commented Sep 2, 2025

@github-actions
Copy link

github-actions bot commented Sep 2, 2025

@github-actions
Copy link

github-actions bot commented Sep 2, 2025

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

github-actions bot commented Sep 2, 2025

- `--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

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
Contributor 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

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
Contributor 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?

```
- A PostgreSQL database with:
- Logical replication enabled
- A dedicated replication slot (or permissions to create one)
Copy link

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
Contributor 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

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

@github-actions
Copy link

github-actions bot commented Sep 2, 2025


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

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
Copy link

github-actions bot commented Sep 4, 2025

@github-actions
Copy link

github-actions bot commented Sep 4, 2025

```
- A PostgreSQL database with:
- Logical replication enabled
- A dedicated replication slot (or permissions to create one)
Copy link

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?

@github-actions
Copy link

github-actions bot commented Sep 8, 2025

@github-actions
Copy link

github-actions bot commented Sep 8, 2025

@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 join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants