Re: Default maximum time replication between master and slave databases - Mailing list pgsql-admin

From Guillaume Lelarge
Subject Re: Default maximum time replication between master and slave databases
Date
Msg-id CAECtzeUkoJKQ1UoTyVD36UhMKTsEo5vdhT3f69-TtcxTA01gaw@mail.gmail.com
Whole thread Raw
In response to Default maximum time replication between master and slave databases  (Alberto Olivares <alberto.olivares@snowflakesoftware.com>)
Responses Re: Default maximum time replication between master and slave databases  (Alberto Olivares <alberto.olivares@snowflakesoftware.com>)
List pgsql-admin

Hi

Le 10 juil. 2015 2:58 PM, "Alberto Olivares" <alberto.olivares@snowflakesoftware.com> a écrit :
>
> Hello,
>
> I am running this query in the slave database: 
>
> SELECT EXTRACT (epoch from now() - pg_last_xact_replay_timestamp());
>
> The maximum result is 60 seconds then the value goes to 0 and start again. I would like to modify this value to maximum 30 seconds.
>
> I have tried to change different parameters on the  postgresql.conf in both databases but I have not find the solution.
>
> Anyone knows how to change this default value?
>

pg_last_xact_replay_timestamp() gives you the timestamp of the last replayed transaction. That doesn't have anything to do with configuration. It mostly depends on the activity on the master. If you don't have any write activity on the master, you'll have bigger values. And that's normal.

--
Guillaume

pgsql-admin by date:

Previous
From: Alberto Olivares
Date:
Subject: Re: Default maximum time replication between master and slave databases
Next
From: Guillaume Lelarge
Date:
Subject: Re: Automatic restore corruption problem