monitor health of native logical replication

Поиск
Список
Период
Сортировка
От Rory Campbell-Lange
Тема monitor health of native logical replication
Дата
Msg-id YuEY+KJfUefgb4sN@campbell-lange.net
обсуждение исходный текст
Список pgsql-general
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






В списке pgsql-general по дате отправления:

Предыдущее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re:
Следующее
От: Wiwwo Staff
Дата:
Сообщение: Feature request: psql --idle