Re: Monitoring Replication - Postgres 9.2

Поиск
Список
Период
Сортировка
От Cachique
Тема Re: Monitoring Replication - Postgres 9.2
Дата
Msg-id CAEfeRhWLMz=tSf-vL9YbJpoSmTZ-GMc2uC=_PBZ9qYk_R6xRKg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Monitoring Replication - Postgres 9.2  (Patrick B <patrickbakerbr@gmail.com>)
Ответы Re: Monitoring Replication - Postgres 9.2  (Melvin Davidson <melvin6925@gmail.com>)
Список pgsql-general
You can try pg_cron.
https://github.com/citusdata/pg_cron
"pg_cron is a simple cron-based job scheduler for PostgreSQL (9.5 or higher) that runs inside the database as an extension. It uses the same syntax as regular cron, but it allows you to schedule PostgreSQL commands directly from the database"

It looks like what you want.

Walter.

On Tue, Nov 29, 2016 at 10:40 PM, Patrick B <patrickbakerbr@gmail.com> wrote:


2016-11-30 14:21 GMT+13:00 John R Pierce <pierce@hogranch.com>:
On 11/29/2016 5:10 PM, Patrick B wrote:

Yep.. once a minute or so. And yes, I need to store a history with timestamp.

Any idea? :)

so create a table with a timestamptz, plus all the fields you want, have a script (perl?  python?  whatever your favorite poison is with database access) that once a minute executes those two queries (you'll need two database connections since only the slave knows how far behind it is), and inserts the data into your table.


-- 
john r pierce, recycling bits in santa cruz


Can't I do it on the DB size? Using a trigger maybe? instead of using Cron?

Patrick 


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

Предыдущее
От: Karsten Hilbert
Дата:
Сообщение: Re: Verify Option with pg_dump
Следующее
От: basti
Дата:
Сообщение: Traffic monitor postgres