Liking cljdoc? Tell your friends :D

datahike.pg.mirror

Read-only shadow databases fed by a PostgreSQL logical publication.

Read-only shadow databases fed by a PostgreSQL logical publication.
raw docstring

-mainclj

(-main & args)
source

publication-reportclj

(publication-report {:keys [source-url leaf-publication] :as config})

Inspect a PostgreSQL 18 publication using only the source catalogs. Returns publication-wide issues and the issues for every table.

Inspect a PostgreSQL 18 publication using only the source catalogs.
Returns publication-wide issues and the issues for every table.
sourceraw docstring

start!clj

(start! {:keys [publication leaf-publication store-path slot-prefix server
                max-snapshot-bytes max-transaction-bytes max-stream-spool-bytes
                schema-refresh? failover? resnapshot-on-slot-loss?]
         :or {slot-prefix "pgdh_mirror"
              max-snapshot-bytes (* 128 1024 1024)
              max-transaction-bytes (* 64 1024 1024)
              max-stream-spool-bytes (* 1024 1024 1024)}
         :as config})

Start a PostgreSQL 18 subscriber. Bootstrap and catch-up run asynchronously. The :server options are passed to the read-only pgwire listener after catch-up. Monitor with status and release resources with stop!. Use a dedicated :store-path.

Start a PostgreSQL 18 subscriber. Bootstrap and catch-up run asynchronously.
The :server options are passed to the read-only pgwire listener after catch-up.
Monitor with status and release resources with stop!. Use a dedicated :store-path.
sourceraw docstring

statusclj

(status {:keys [state spool-bytes]})

Return the mirror's current state and progress. The source timestamp is measured in microseconds since PostgreSQL's 2000-01-01 UTC epoch.

Return the mirror's current state and progress. The source timestamp is
measured in microseconds since PostgreSQL's 2000-01-01 UTC epoch.
sourceraw docstring

stop!clj

(stop! {:keys [stopping? worker] :as mirror})

Stop following and close the read-only listener. The durable checkpoint and publisher slot are kept for the next start.

Stop following and close the read-only listener. The durable checkpoint
and publisher slot are kept for the next start.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close