pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedDefault maximum time replication between master and slave databases
8+ messages / 4 participants
[nested] [flat]
* Default maximum time replication between master and slave databases
@ 2015-07-10 12:54 Alberto Olivares <alberto.olivares@snowflakesoftware.com>
0 siblings, 2 replies; 8+ messages in thread
From: Alberto Olivares @ 2015-07-10 12:54 UTC (permalink / raw)
To: pgsql-admin
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?
Thanks.
Regards,
Alberto.
*Alberto Olivares Colas*Technical Consultant
Snowflake Software
Tel.: +44 (0)2380 386578
Email: alberto.olivares@snowflakesoftware.com
Website: www.snowflakesoftware.com
Twitter: @sflakesoftware <http://www,twitter.com@sflakesoftware/;
Follow us on LinkedIn <http://www.linkedin.com/company/snowflake-software;
*Winner of IHS Jane's ATC Award - Enabling Technology*
*Read more <http://www.snowflakesoftware.com/2015/03/janes-award/>*
Registered in England & Wales. Registered Number: 4294244
-----------------------------------------------------------------------------------------
--
*Winner of IHS Jane's ATC Award - Enabling Technology*
*Read more <http://www.snowflakesoftware.com/2015/03/janes-award/>*
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Default maximum time replication between master and slave databases
@ 2015-07-10 13:32 Scott Ribe <scott_ribe@elevated-dev.com>
parent: Alberto Olivares <alberto.olivares@snowflakesoftware.com>
1 sibling, 1 reply; 8+ messages in thread
From: Scott Ribe @ 2015-07-10 13:32 UTC (permalink / raw)
To: Alberto Olivares <alberto.olivares@snowflakesoftware.com>; +Cc: pgsql-admin
On Jul 10, 2015, at 6:54 AM, Alberto Olivares <alberto.olivares@snowflakesoftware.com> wrote:
>
> 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.
WAL shipping or streaming?
--
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
https://www.linkedin.com/in/scottribe/
(303) 722-0567 voice
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Default maximum time replication between master and slave databases
@ 2015-07-10 13:47 Alberto Olivares <alberto.olivares@snowflakesoftware.com>
parent: Scott Ribe <scott_ribe@elevated-dev.com>
0 siblings, 0 replies; 8+ messages in thread
From: Alberto Olivares @ 2015-07-10 13:47 UTC (permalink / raw)
To: Scott Ribe <scott_ribe@elevated-dev.com>; +Cc: pgsql-admin
Streaming replication.
*Alberto Olivares Colas*Technical Consultant
Snowflake Software
Tel.: +44 (0)2380 386578
Email: alberto.olivares@snowflakesoftware.com
Website: www.snowflakesoftware.com
Twitter: @sflakesoftware <http://www,twitter.com@sflakesoftware/;
Follow us on LinkedIn <http://www.linkedin.com/company/snowflake-software;
*Winner of IHS Jane's ATC Award - Enabling Technology*
*Read more <http://www.snowflakesoftware.com/2015/03/janes-award/>*
Registered in England & Wales. Registered Number: 4294244
-----------------------------------------------------------------------------------------
On 10 July 2015 at 14:32, Scott Ribe <scott_ribe@elevated-dev.com> wrote:
> On Jul 10, 2015, at 6:54 AM, Alberto Olivares <
> alberto.olivares@snowflakesoftware.com> wrote:
> >
> > 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.
>
> WAL shipping or streaming?
>
> --
> Scott Ribe
> scott_ribe@elevated-dev.com
> http://www.elevated-dev.com/
> https://www.linkedin.com/in/scottribe/
> (303) 722-0567 voice
>
>
>
>
>
>
--
*Winner of IHS Jane's ATC Award - Enabling Technology*
*Read more <http://www.snowflakesoftware.com/2015/03/janes-award/>*
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Default maximum time replication between master and slave databases
@ 2015-07-10 13:56 Guillaume Lelarge <guillaume@lelarge.info>
parent: Alberto Olivares <alberto.olivares@snowflakesoftware.com>
1 sibling, 1 reply; 8+ messages in thread
From: Guillaume Lelarge @ 2015-07-10 13:56 UTC (permalink / raw)
To: Alberto Olivares <alberto.olivares@snowflakesoftware.com>; +Cc: 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
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Default maximum time replication between master and slave databases
@ 2015-07-10 14:07 Alberto Olivares <alberto.olivares@snowflakesoftware.com>
parent: Guillaume Lelarge <guillaume@lelarge.info>
0 siblings, 1 reply; 8+ messages in thread
From: Alberto Olivares @ 2015-07-10 14:07 UTC (permalink / raw)
To: Guillaume Lelarge <guillaume@lelarge.info>; +Cc: pgsql-admin
Hi,
I don't have any write activity on the master, but still this value goes to
60 seconds and then restart constantly from 0 again .
Regards,
Alberto.
*Alberto Olivares Colas*Technical Consultant
Snowflake Software
Tel.: +44 (0)2380 386578
Email: alberto.olivares@snowflakesoftware.com
Website: www.snowflakesoftware.com
Twitter: @sflakesoftware <http://www,twitter.com@sflakesoftware/;
Follow us on LinkedIn <http://www.linkedin.com/company/snowflake-software;
*Winner of IHS Jane's ATC Award - Enabling Technology*
*Read more <http://www.snowflakesoftware.com/2015/03/janes-award/>*
Registered in England & Wales. Registered Number: 4294244
-----------------------------------------------------------------------------------------
On 10 July 2015 at 14:56, Guillaume Lelarge <guillaume@lelarge.info> wrote:
> 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
>
--
*Winner of IHS Jane's ATC Award - Enabling Technology*
*Read more <http://www.snowflakesoftware.com/2015/03/janes-award/>*
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Default maximum time replication between master and slave databases
@ 2015-07-10 14:11 Guillaume Lelarge <guillaume@lelarge.info>
parent: Alberto Olivares <alberto.olivares@snowflakesoftware.com>
0 siblings, 1 reply; 8+ messages in thread
From: Guillaume Lelarge @ 2015-07-10 14:11 UTC (permalink / raw)
To: Alberto Olivares <alberto.olivares@snowflakesoftware.com>; +Cc: pgsql-admin
Le 10 juil. 2015 4:07 PM, "Alberto Olivares" <
alberto.olivares@snowflakesoftware.com> a écrit :
>
> Hi,
>
> I don't have any write activity on the master, but still this value goes
to 60 seconds and then restart constantly from 0 again .
>
Well, you have. That might be autovacuum doing some vacuum or analyze
without you noticing it.
--
Guillaume
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Default maximum time replication between master and slave databases
@ 2015-07-10 14:23 Alberto Olivares <alberto.olivares@snowflakesoftware.com>
parent: Guillaume Lelarge <guillaume@lelarge.info>
0 siblings, 1 reply; 8+ messages in thread
From: Alberto Olivares @ 2015-07-10 14:23 UTC (permalink / raw)
To: Guillaume Lelarge <guillaume@lelarge.info>; +Cc: pgsql-admin
Thanks Guillaume,
maybe. I am trying to find the parameter that controls this value but I
cannot find it. Last thing I tried was to modify the vacuum parameters on
the slave but nothing changes.
*Alberto Olivares Colas*Technical Consultant
Snowflake Software
Tel.: +44 (0)2380 386578
Email: alberto.olivares@snowflakesoftware.com
Website: www.snowflakesoftware.com
Twitter: @sflakesoftware <http://www,twitter.com@sflakesoftware/;
Follow us on LinkedIn <http://www.linkedin.com/company/snowflake-software;
*Winner of IHS Jane's ATC Award - Enabling Technology*
*Read more <http://www.snowflakesoftware.com/2015/03/janes-award/>*
Registered in England & Wales. Registered Number: 4294244
-----------------------------------------------------------------------------------------
On 10 July 2015 at 15:11, Guillaume Lelarge <guillaume@lelarge.info> wrote:
> Le 10 juil. 2015 4:07 PM, "Alberto Olivares" <
> alberto.olivares@snowflakesoftware.com> a écrit :
> >
> > Hi,
> >
> > I don't have any write activity on the master, but still this value goes
> to 60 seconds and then restart constantly from 0 again .
> >
>
> Well, you have. That might be autovacuum doing some vacuum or analyze
> without you noticing it.
>
> --
> Guillaume
>
--
*Winner of IHS Jane's ATC Award - Enabling Technology*
*Read more <http://www.snowflakesoftware.com/2015/03/janes-award/>*
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Default maximum time replication between master and slave databases
@ 2015-07-10 14:27 Keith <keith@keithf4.com>
parent: Alberto Olivares <alberto.olivares@snowflakesoftware.com>
0 siblings, 0 replies; 8+ messages in thread
From: Keith @ 2015-07-10 14:27 UTC (permalink / raw)
To: Alberto Olivares <alberto.olivares@snowflakesoftware.com>; +Cc: pgsql-admin
On Fri, Jul 10, 2015 at 10:23 AM, Alberto Olivares <
alberto.olivares@snowflakesoftware.com> wrote:
> Thanks Guillaume,
>
> maybe. I am trying to find the parameter that controls this value but I
> cannot find it. Last thing I tried was to modify the vacuum parameters on
> the slave but nothing changes.
>
>
>
>
> *Alberto Olivares Colas*Technical Consultant
> Snowflake Software
>
> Tel.: +44 (0)2380 386578
>
> Email: alberto.olivares@snowflakesoftware.com
> Website: www.snowflakesoftware.com
> Twitter: @sflakesoftware <http://www,twitter.com@sflakesoftware/;
> Follow us on LinkedIn <http://www.linkedin.com/company/snowflake-software;
>
> *Winner of IHS Jane's ATC Award - Enabling Technology*
> *Read more <http://www.snowflakesoftware.com/2015/03/janes-award/>*
>
> Registered in England & Wales. Registered Number: 4294244
>
> -----------------------------------------------------------------------------------------
>
>
>
>
> On 10 July 2015 at 15:11, Guillaume Lelarge <guillaume@lelarge.info>
> wrote:
>
>> Le 10 juil. 2015 4:07 PM, "Alberto Olivares" <
>> alberto.olivares@snowflakesoftware.com> a écrit :
>> >
>> > Hi,
>> >
>> > I don't have any write activity on the master, but still this value
>> goes to 60 seconds and then restart constantly from 0 again .
>> >
>>
>> Well, you have. That might be autovacuum doing some vacuum or analyze
>> without you noticing it.
>>
>> --
>> Guillaume
>>
>
>
> *Winner of IHS Jane's ATC Award - Enabling Technology*
> *Read more <http://www.snowflakesoftware.com/2015/03/janes-award/>*
>
I still don't think you're understanding how replication works along with
trying to use this function to monitor slave lag. I tried to give a good
summary here.
http://www.keithf4.com/monitoring_streaming_slave_lag/
^ permalink raw reply [nested|flat] 8+ messages in thread
end of thread, other threads:[~2015-07-10 14:27 UTC | newest]
Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-07-10 12:54 Default maximum time replication between master and slave databases Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-07-10 13:32 ` Scott Ribe <scott_ribe@elevated-dev.com>
2015-07-10 13:47 ` Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-07-10 13:56 ` Guillaume Lelarge <guillaume@lelarge.info>
2015-07-10 14:07 ` Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-07-10 14:11 ` Guillaume Lelarge <guillaume@lelarge.info>
2015-07-10 14:23 ` Alberto Olivares <alberto.olivares@snowflakesoftware.com>
2015-07-10 14:27 ` Keith <keith@keithf4.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox