Re: Re: In-core regression tests for replication, cascading, archiving, PITR, etc.
Amir Rohan <amir.rohan@zoho.com>
From: Amir Rohan <amir.rohan@zoho.com>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>, Noah Misch <noah@leadboat.com>,
Andres Freund <andres@2ndquadrant.com>,
PostgreSQL mailing lists <pgsql-hackers@postgresql.org>,
Greg Smith <gsmith@gregsmith.com>
Date: 2015-10-08T14:28:06Z
Lists: pgsql-hackers
On 10/08/2015 04:47 PM, Michael Paquier wrote: > On Thu, Oct 8, 2015 at 6:03 PM, Amir Rohan wrote: >> On 10/08/2015 10:39 AM, Michael Paquier wrote: >>>> Someone mentioned a daisy chain setup which sounds fun. Anything else in >>>> particular? Also, it would be nice to have some canned way to measure >>>> end-to-end replication latency for variable number of nodes. >>> >>> Hm. Do you mean comparing the LSN position between two nodes even if >>> both nodes are not connected to each other? What would you use it for? >>> >> >> In a cascading replication setup, the typical _time_ it takes for a >> COMMIT on master to reach the slave (assuming constant WAL generation >> rate) is an important operational metric. > > Hm. You mean the exact amount of time it gets to be sure that a given > WAL position has been flushed on a cascading standby, be it across > multiple layers. Er, that's a bit tough without patching the backend > where I guess we would need to keep a track of when a LSN position has > been flushed. And calls of gettimeofday are expensive, so that does > not sound like a plausible alternative here to me... > Wouldn't this work? 1) start timer 2) Grab pg_stat_replication.sent_location from master 3) pg_switch_xlog() # I /think/ we want this, could be wrong 4) Poll slave's pg_last_xlog_replay_location() until LSN shows up 5) stop timer Amir
Commits
-
Add a test framework for recovery
- 49148645f7f3 9.6.0 landed
-
Refactor Perl test code
- 1caef31d9e55 9.6.0 cited
-
pgindent run for 9.5
- 807b9e0dff66 9.5.0 cited