Search Postgresql Archives

monitor health of native logical replication

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Based on my initial testing native logical replication seems easier and faster
to setup than pglogical, and may be easier for our team to administer.

One sticking point is monitoring the health of native logical replication.

Are there some native logical replication functions or calls that can, for
example, provide info such as the function pglogical.show_subscription_status?

        if (pglogical_worker_running(apply))
        {
            PGLogicalSyncStatus    *sync;
            sync = get_subscription_sync_status(sub->id, true);

            if (!sync)
                status = "unknown";
            else if (sync->status == SYNC_STATUS_READY)
                status = "replicating";
            else
                status = "initializing";
        }
        else if (!sub->enabled)
            status = "disabled";
        else
            status = "down";

The native pg_stat_subscription view does not show, for example, if the
subscription is down.

Rory








[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux