Skip to content

Latest commit

 

History

History
65 lines (50 loc) · 3.82 KB

File metadata and controls

65 lines (50 loc) · 3.82 KB
title pg hardstorage logical stream
description CLI reference for the pg hardstorage logical stream command.
tags
cli
reference

pg_hardstorage logical stream

Run the long-lived consumer for a registered stream

Synopsis

Open a logical-replication connection, ensure the slot exists, and consume into the configured sink (v0.1: chunked).

Each batch of XLogData is buffered up to the chunked sink's BatchBytes (default 16 MiB) or BatchInterval (default 5s) — whichever fires first — and committed atomically. Standby Status Updates forward the sink's SyncedLSN every status-interval, advancing the slot's confirmed_flush_lsn so PG can release retained WAL.

Send SIGINT or SIGTERM to stop cleanly. Any in-flight batch is flushed before exit.

pg_hardstorage logical stream <name> [flags]

Options

  -h, --help                          help for stream
      --inactivity-timeout duration   abort if no message arrives in this duration (0 = streaming default)
      --pg-connection string          libpq connection string for the source PG (required)
      --start-lsn string              explicit start LSN (default: 0/0 — let the slot drive)
      --status-interval duration      status-update cadence (default 10s)

Options inherited from parent commands

      --airgapped airgapped: strict                                                       refuse outbound endpoints (LLM providers, sinks, OTLP collectors) outside loopback / RFC1918 / explicit airgap.allowlist. Also enabled by PG_HARDSTORAGE_AIRGAPPED=1 or airgapped: strict in the config file.
  -c, --config string                                                                     path to config file (default: XDG/FHS lookup)
      --cpu-profile go tool pprof <path>                                                  write a pprof CPU profile to this path for the duration of the command (go tool pprof <path> to analyse). Off when empty.
      --mem-profile string                                                                write a pprof heap profile to this path at command exit. Off when empty.
      --no-color                                                                          disable ANSI color in text output
      --on-error-llm                                                                      on a structured-error failure, drop into the matching LLM helper skill (auto_on_error trigger). Also enabled by PG_HARDSTORAGE_ON_ERROR_LLM=1.
      --otel-endpoint string                                                              OpenTelemetry OTLP/HTTP endpoint (e.g. http://otel-collector:4318); empty disables tracing
      --otel-stdout                                                                       also export OpenTelemetry traces to stderr (useful for dev)
  -o, --output string                                                                     output format: text|json|ndjson|yaml|template|csv|markdown|html|tap|junit|pdf (default: text on TTY, json off-TTY)
      --profile-port go tool pprof http://127.0.0.1:6060/debug/pprof/profile?seconds=30   if non-zero, expose net/http/pprof on 127.0.0.1:<port> for live profiling of long-running commands (e.g. go tool pprof http://127.0.0.1:6060/debug/pprof/profile?seconds=30). Off when zero.
  -q, --quiet                                                                             suppress non-essential output
      --template string                                                                   Go text/template applied when --output template (or implied if --template is set without --output)

SEE ALSO