---
title: "stream - Xata"
description: "Commands for managing logical streaming replication operations"
source: "https://xata.io/docs/cli/stream"
---

Skip to main content

The stream command helps you manage database streaming operations with `pgstream`, using logical replication.

Tip

You can override the `pgstream` binary version used by the CLI via the `XATA_PGSTREAM_BINARY_VERSION` environment variable. See [Binary Version Overrides](/docs/cli/index#binary-version-overrides) for details.

## ​Subcommands

### ​destroy

Destroy any pgstream setup, removing the replication slot and all the relevant tables/functions/triggers, along with the internal pgstream schema.

```
xata stream destroy --source-url <url> [--config <file>] [--log-level <level>] [--postgres-url <url>] [--replication-slot <name>] [-h|--help]
```

​

\--source-url

string

required

The source URL of the database to clone

​

\--config

string

.env or .yaml config file to use with pgstream if any

​

\--log-level

string

Log level for pgstream (trace|debug|info|warn|error|fatal|panic, default: info)

​

\--postgres-url

string

Source postgres URL where pgstream destroy will be run

​

\--replication-slot

string

Name of the postgres replication slot to be deleted by pgstream from the source url

​

-h, --help

boolean

Print help information and exit

## ​Global Flags

​

-h, --help

boolean

Print help information and exit

​

\--json

boolean

Output in JSON format

Was this page helpful?

[Previous](/docs/cli/status)

[upgrade](/docs/cli/upgrade)

[Next](/docs/cli/upgrade)
