pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feed"Time of latest checkpoint" stays too old on both master and slave
5+ messages / 2 participants
[nested] [flat]
* "Time of latest checkpoint" stays too old on both master and slave
@ 2019-06-30 06:49 rihad <rihad@mail.ru>
0 siblings, 1 reply; 5+ messages in thread
From: rihad @ 2019-06-30 06:49 UTC (permalink / raw)
To: pgsql-general
Current time is 10:44. pg_controldata shows on both on master & slave
server which uses streaming replication:
Time of latest checkpoint: Sun Jun 30 07:49:18 2019
So it was almost 3 hours ago. There are always some heavy writes and a
new WAL file in the pg_wal/ directory is created every few minutes.
checkpoint_timeout is 20min so it should have triggered long ago.
checkpoint_timeout = 20min #5min # range 30s-1d
max_wal_size = 8GB
min_wal_size = 80MB
checkpoint_completion_target = 0.9
hot_standby is enabled on the slave, hot_standby_feedback is off not to
bloat the master,
hot_standby_streaming_delay is 30min.
Experiencing this long delay after the upgrade (via dump/restore) from
PG 9.6 to 11.4.
Thanks for any tips.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: "Time of latest checkpoint" stays too old on both master and slave
@ 2019-06-30 06:59 rihad <rihad@mail.ru>
parent: rihad <rihad@mail.ru>
0 siblings, 1 reply; 5+ messages in thread
From: rihad @ 2019-06-30 06:59 UTC (permalink / raw)
To: pgsql-general
Damn. Sorry, and please disregard my post. The master server had the
wrong time. Not wrong TZ, simply wrong time.
$ date
Sun Jun 30 08:34:52 +04 2019
while it's currently 10:58
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: "Time of latest checkpoint" stays too old on both master and slave
@ 2019-06-30 07:07 rihad <rihad@mail.ru>
parent: rihad <rihad@mail.ru>
0 siblings, 1 reply; 5+ messages in thread
From: rihad @ 2019-06-30 07:07 UTC (permalink / raw)
To: pgsql-general
On 06/30/2019 10:59 AM, rihad wrote:
> Damn. Sorry, and please disregard my post. The master server had the
> wrong time. Not wrong TZ, simply wrong time.
>
> $ date
> Sun Jun 30 08:34:52 +04 2019
>
> while it's currently 10:58
There's a weird problem, even when the time is initially set by openntpd
it keeps lagging by one second every few seconds:
$ sudo /usr/local/etc/rc.d/openntpd restart
Performing sanity check on openntpd configuration:
configuration OK
Stopping openntpd.
Waiting for PIDS: 85893.
Performing sanity check on openntpd configuration:
configuration OK
Starting openntpd.
$ ssh good-server date; date
Sun Jun 30 11:04:17 +04 2019
Sun Jun 30 11:04:17 +04 2019
$ ssh good-server date; date
Sun Jun 30 11:04:25 +04 2019
Sun Jun 30 11:04:24 +04 2019
$ ssh good-server date; date
Sun Jun 30 11:04:32 +04 2019
Sun Jun 30 11:04:31 +04 2019
$ ssh good-server date; date
Sun Jun 30 11:04:39 +04 2019
Sun Jun 30 11:04:37 +04 2019
$ ssh good-server date; date
Sun Jun 30 11:04:48 +04 2019
Sun Jun 30 11:04:45 +04 2019
Really weird. But this isn't a PG problem at all, just a server glitch
maybe. sorry again.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: "Time of latest checkpoint" stays too old on both master and slave
@ 2019-06-30 17:45 Andrew Gierth <andrew@tao11.riddles.org.uk>
parent: rihad <rihad@mail.ru>
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Gierth @ 2019-06-30 17:45 UTC (permalink / raw)
To: rihad <rihad@mail.ru>; +Cc: pgsql-general
>>>>> "rihad" == rihad <rihad@mail.ru> writes:
rihad> There's a weird problem, even when the time is initially set by
rihad> openntpd it keeps lagging by one second every few seconds:
rihad> $ sudo /usr/local/etc/rc.d/openntpd restart
What OS is this?
I've seen this kind of thing with FreeBSD where the kernel timecounter
source has been chosen badly (i.e. choosing TSC when the TSC isn't
actually invariant enough). Forcing TSC not to be used fixes it. The
configuration I've especially noticed it on is when running in a VM with
a single virtual CPU.
--
Andrew (irc:RhodiumToad)
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: "Time of latest checkpoint" stays too old on both master and slave
@ 2019-06-30 17:55 rihad <rihad@mail.ru>
parent: Andrew Gierth <andrew@tao11.riddles.org.uk>
0 siblings, 0 replies; 5+ messages in thread
From: rihad @ 2019-06-30 17:55 UTC (permalink / raw)
To: Andrew Gierth <andrew@tao11.riddles.org.uk>; +Cc: pgsql-general
On 06/30/2019 09:45 PM, Andrew Gierth wrote:
>>>>>> "rihad" == rihad <rihad@mail.ru> writes:
> rihad> There's a weird problem, even when the time is initially set by
> rihad> openntpd it keeps lagging by one second every few seconds:
>
> rihad> $ sudo /usr/local/etc/rc.d/openntpd restart
>
> What OS is this?
>
> I've seen this kind of thing with FreeBSD where the kernel timecounter
> source has been chosen badly (i.e. choosing TSC when the TSC isn't
> actually invariant enough). Forcing TSC not to be used fixes it. The
> configuration I've especially noticed it on is when running in a VM with
> a single virtual CPU.
>
Exactly. You're right. It's on FreeBSD 11.2. After some googling earlier
I changed kern.timecounter.hardware=HPET and solved the problem. The
default chosen value TSC-low seems to misbehave for this box, although
it works on others (running the same FreeBSD version).
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2019-06-30 17:55 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-06-30 06:49 "Time of latest checkpoint" stays too old on both master and slave rihad <rihad@mail.ru>
2019-06-30 06:59 ` rihad <rihad@mail.ru>
2019-06-30 07:07 ` rihad <rihad@mail.ru>
2019-06-30 17:45 ` Andrew Gierth <andrew@tao11.riddles.org.uk>
2019-06-30 17:55 ` rihad <rihad@mail.ru>
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