Re: Monitoring Replication - Postgres 9.2

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: Monitoring Replication - Postgres 9.2
Дата
Msg-id 5bf19ba7-cbb8-bf24-81dc-326e61d17b9d@hogranch.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
On 11/29/2016 5:40 PM, Patrick B wrote:
>
>
> Can't I do it on the DB size? Using a trigger maybe? instead of using
> Cron?

triggers are only called on database events like insert, update,
select.   even something like the pgagent scheduler thats frequently
bundled with pgadmin uses cron to run its master time process, which
checks to see if there are any pending pgagent jobs and invokes them.



for a every-minute event, i wouldn't use cron, I would write a little
script/application in something like perl or python, which keeps
persistent connections open, samples your data, inserts it, and sleeps
til the next minute then repeats.     running it from cron would require
multiple process forks every sample, which is fairly expensive.




--
john r pierce, recycling bits in santa cruz



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

Предыдущее
От: Patrick B
Дата:
Сообщение: Re: Monitoring Replication - Postgres 9.2
Следующее
От: Melvin Davidson
Дата:
Сообщение: Re: Monitoring Replication - Postgres 9.2