WalEx.Replication.QueryBuilder (WalEx v4.8.0)

Copy Markdown View Source

SQL and replication command strings used by WalEx.Replication.Server to verify publication state and start logical decoding over the pgoutput plugin.

Each function takes a config map containing the relevant fields (:publication, :slot_name) and returns a raw query string.

Summary

Functions

Replication command to create a durable logical slot that survives restarts.

Replication command to create a temporary logical slot dropped on disconnect.

Query that returns 1 if the configured publication exists.

Query that returns the active flag for the configured replication slot.

Replication command that starts streaming WAL changes from the slot for the publication.

Functions

create_durable_slot(map)

Replication command to create a durable logical slot that survives restarts.

create_temporary_slot(map)

Replication command to create a temporary logical slot dropped on disconnect.

publication_exists(map)

Query that returns 1 if the configured publication exists.

slot_exists(map)

Query that returns the active flag for the configured replication slot.

start_replication_slot(map)

Replication command that starts streaming WAL changes from the slot for the publication.