On 11/30/2016 11:57 AM, Patrick B wrote:
but there is queries like this:
select now() - pg_last_xact_replay_timestamp() AS replication_delay;
that need to be ran into a slave.. how can I insert that data into a
table on the slave?
you would insert that data into a table on the MASTER,
2016-12-01 5:54 GMT+13:00 Melvin Davidson :
>
> On Wed, Nov 30, 2016 at 8:04 AM, Cachique wrote:
>
>> 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 u
On Wed, Nov 30, 2016 at 8:04 AM, Cachique wrote:
> 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 y
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
On 11/29/2016 6:01 PM, Melvin Davidson wrote:
There is no reason you can't execute a cron job on production to a
remote db.
eg:
contents of cron
*/5 * * * * psql -U postgres -h 123.4.56.789 -d remote_db_name -f
/path_to/exec.sql
...
The OP wants to run queries on the master and the s
On Tue, Nov 29, 2016 at 8:55 PM, John R Pierce wrote:
> 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 pgag
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 it
2016-11-30 14:21 GMT+13:00 John R Pierce :
> 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? wha
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
2016-11-30 14:02 GMT+13:00 John R Pierce :
> On 11/29/2016 3:31 PM, Patrick B wrote:
>
> I use these queries to monitor the streaming replication:
>
> *on master:*
> select client_addr, state, sent_location, write_location, flush_location,
> replay_location, sync_priority from pg_stat_replication;
On 11/29/2016 3:31 PM, Patrick B wrote:
I use these queries to monitor the streaming replication:
*on master:*
select client_addr, state, sent_location, write_location,
flush_location, replay_location, sync_priority from pg_stat_replication;
*On slave:*
select now() - pg_last_xact_replay_time
Hi guys,
I use these queries to monitor the streaming replication:
*on master:*
select client_addr, state, sent_location, write_location, flush_location,
replay_location, sync_priority from pg_stat_replication;
*On slave:*
select now() - pg_last_xact_replay_timestamp() AS replication_delay;
Can
There is also http://bucardo.org/wiki/Check_postgres but I haven't been able
to get it to work for monitoring replication. I am using a similar custom
script as Mahlon, but written in perl. Looking at Mahlon's code has shown
me an error in how I have been thinking about calculating the replicatio
On Wed, Oct 12, 2011, Brandon Phelps wrote:
> I use Nagios to monitor various things on a few servers and have
> recently set up a hot-standby server and would obviously like to
> include the state of streaming replication in my monitoring.
>
> [...]
>
> The confusion I have is how exactly can I d
Hello all,
I use Nagios to monitor various things on a few servers and have recently set
up a hot-standby server and would obviously like to include the state of
streaming replication in my monitoring.
I know about the pg_stat_replication view on the master and the
pg_last_xlog_receive_locati
15 matches
Mail list logo