(add-status-alias db schema)
Create a function which wraps the pglogical show_subscription_status function, allowing it to be called by any user, not just admin. This function is used by pglogical replication status, and is required for it to function.
Create a function which wraps the pglogical show_subscription_status function, allowing it to be called by any user, not just admin. This function is used by pglogical replication status, and is required for it to function.
(combined-replication-status db replication-mode service-name)
(combined-replication-status db replication-mode service-name timeout)
Return a map with of pglogical status information suitable for inclusion in a tk-status response. It looks like this:
{:alerts [{:severity :error, :message "human readable message"] :structured-status {:mode (:source, :replica, or :none) :status (:running, :down, :disabled, :unknown, :inactive, or :none)}
The seq at the alerts key may be nil if there's nothing wrong. It should be combined with any application-specific alerts and returned in the :alerts section of the tk-status response.
The value at the :structured-status key should be included in the tk-status response at the path [:status :replication].
Return a map with of pglogical status information suitable for inclusion in a tk-status response. It looks like this: {:alerts [{:severity :error, :message "human readable message"] :structured-status {:mode (:source, :replica, or :none) :status (:running, :down, :disabled, :unknown, :inactive, or :none)} The seq at the alerts key may be nil if there's nothing wrong. It should be combined with any application-specific alerts and returned in the :alerts section of the tk-status response. The value at the :structured-status key should be included in the tk-status response at the path [:status :replication].
(consolidate-replica-status statuses)
Given a list of states of pglogical subscriptions, returns the status of data replication. Returns :running if all subscriptions for that database are up and running, :disabled if any subscription has been turned off, :down if any connection has been severed (overrides :disabled), :none if pglogical replication is not configured, or :unknown. Note that :down may not be returned for some time or at all, depending on your postgresql TCP settings.
Given a list of states of pglogical subscriptions, returns the status of data replication. Returns :running if all subscriptions for that database are up and running, :disabled if any subscription has been turned off, :down if any connection has been severed (overrides :disabled), :none if pglogical replication is not configured, or :unknown. Note that :down may not be returned for some time or at all, depending on your postgresql TCP settings.
(update-pglogical-replication-set db schema)
Tries to update the default pglogical replication set to replicate all tables in the given schema. If the db user don't have rights to update pglogical, catches the exception and returns false. Other exceptions are passed through. Returns true if the replication set was successfully updated.
Tries to update the default pglogical replication set to replicate all tables in the given schema. If the db user don't have rights to update pglogical, catches the exception and returns false. Other exceptions are passed through. Returns true if the replication set was successfully updated.
(wrap-ddl-for-pglogical sql schema)
Wrap the given sql (presumably DDL) in a call to pglogical.replicate_ddl_command, escaping quotes and wrapping the statement so it won't return anything.
Wrap the given sql (presumably DDL) in a call to pglogical.replicate_ddl_command, escaping quotes and wrapping the statement so it won't return anything.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close