pg.ddx.io pgsql-admin@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Matt Patey <matt.patey@ableton.com>
To: Scott Ribe <scott_ribe@elevated-dev.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: Simultaneously streaming database replication and pg_dump, yet observing zero lag
Date: Thu, 30 Apr 2015 15:13:21 +0000
Message-ID: <12F01437-78B6-4A56-B717-A91E360BF216@ableton.com> (raw)
In-Reply-To: <EE1482C5-35B8-487B-89A2-9157C5B8ABB5@elevated-dev.com>
References: <A1BBF909-1F33-4704-963E-F61F23F8FB58@ableton.com>
<EE1482C5-35B8-487B-89A2-9157C5B8ABB5@elevated-dev.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
Hi Scott,
Thanks for the quick answer! The odd thing is that we see this behaviour, say, once or twice a month, and then the lag pattern becomes regular again. Since this is something that is specific to database activity, I'll have to do a bit of digging around to see what might be causing the inconsistency.
Cheers,
Matt
-----Original Message-----
From: Scott Ribe
Date: Thursday 30 April 2015 16:08 pm
To: Matt Patey
Cc: "pgsql-admin@postgresql.org"
Subject: Re: [ADMIN] Simultaneously streaming database replication and pg_dump, yet observing zero lag
On Apr 30, 2015, at 8:00 AM, Matt Patey <matt.patey@ableton.com> wrote:
>
> We have a streaming replication setup, where the replication slave runs pg_dump every hour. Our lag monitor shows an expected sawtooth shape, where pg_dump runs coincide with a climbing lag, which ends abruptly when pg_dump is finished. This is, to the best of my knowledge, expected behaviour. The lag pattern occasionally disappears though, and when looking at system processes we see that the database is recovering WAL data, and pg_dump is also running. How is this even possible?
Any query (and pg_dump is a series of queries) does not necessarily block recovery. AFAIK, it’s only when the query requires a version of a row which would be removed by WAL replay that the recovery gets blocked. So it’s possible for pg_dump to not block recovery, but in any reasonably active db I think it’s unlikely—exactly what you’re seeing.
--
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
view thread (4+ messages)
Message-ID: <12F01437-78B6-4A56-B717-A91E360BF216@ableton.com> Permalink: ../12F01437-78B6-4A56-B717-A91E360BF216@ableton.com/ Also on: postgresql.org/message-id/12F01437-78B6-4A56-B717-A91E360BF216@ableton.com ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients from your mail client; the link fills in the headers below: reply via email Some clients, webmail especially, drop In-Reply-To and References from a link, and the reply then starts a new thread: use the mbox below. To: pgsql-admin@postgresql.org Cc: matt.patey@ableton.com, scott_ribe@elevated-dev.com Subject: Re: Simultaneously streaming database replication and pg_dump, yet observing zero lag In-Reply-To: <12F01437-78B6-4A56-B717-A91E360BF216@ableton.com> References: <A1BBF909-1F33-4704-963E-F61F23F8FB58@ableton.com> <EE1482C5-35B8-487B-89A2-9157C5B8ABB5@elevated-dev.com> <12F01437-78B6-4A56-B717-A91E360BF216@ableton.com> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
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