tcb db pg realtime enable
Enable the Realtime service for a PG mode environment. It covers Broadcast, Presence, and PostgreSQL CDC (postgres_changes).
Version
The tcb db pg realtime commands are available since v3.9.0.
Usage
tcb db pg realtime enable -e <envId>
Parameters
| Parameter | Required | Description | Default |
|---|---|---|---|
-e, --env-id <envId> | Yes | Environment ID | — |
--json | No | Output JSON | — |
Examples
# Enable the service
tcb db pg realtime enable -e <envId>
# JSON output for pipelines
tcb db pg realtime enable -e <envId> --json
The JSON output looks like:
{
"Enabled": true,
"RequestId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Notes
- The command is idempotent. Running it on an enabled environment does not fail; running it on a suspended environment resumes the service
- Only the service state changes; rate limits, channel policies, and other settings are left untouched
- Resuming the service disconnects all existing connections, so clients must reconnect and re-subscribe
- When enabling does not take effect, the command reports a failure instead of succeeding silently
- Use
setfor rate limits and channel policies, andgetto read the current values
Related Commands
- Query Realtime settings
- Update Realtime settings
- Client integration: Realtime quick start