Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YQzg7-0007Yo-F0 for pgsql-admin@arkaria.postgresql.org; Thu, 26 Feb 2015 14:44:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YQzg5-0006bV-U5 for pgsql-admin@arkaria.postgresql.org; Thu, 26 Feb 2015 14:44:37 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YQzg4-0006bP-UI for pgsql-admin@postgresql.org; Thu, 26 Feb 2015 14:44:37 +0000 Received: from www.ipv6.roaringpenguin.com ([2607:f748:1200:fb:70:38:112:54] helo=colo3.roaringpenguin.com) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1YQzg0-0003d9-VK for pgsql-admin@postgresql.org; Thu, 26 Feb 2015 14:44:34 +0000 Received: from vanadium.roaringpenguin.com ([192.168.10.23]) by colo3.roaringpenguin.com (8.14.3/8.14.3/Debian-9.4) with ESMTP id t1QEiTsI006206 for ; Thu, 26 Feb 2015 09:44:29 -0500 Received: from hydrogen.roaringpenguin.com (dfs@hydrogen.roaringpenguin.com [192.168.10.1]) by vanadium.roaringpenguin.com (8.14.4/8.14.4/Debian-4) with ESMTP id t1QEiSFs013576 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Thu, 26 Feb 2015 09:44:29 -0500 Date: Thu, 26 Feb 2015 09:44:28 -0500 From: "David F. Skoll" To: pgsql-admin@postgresql.org Subject: Re: Weird spikes in delay for async streaming replication on 9.1 Message-ID: <20150226094428.34531376@hydrogen.roaringpenguin.com> In-Reply-To: <20150214110050.2f032f05@ollie.roaringpenguin.com> References: <20150214110050.2f032f05@ollie.roaringpenguin.com> Organization: Roaring Penguin Software Inc. X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=roaringpenguin.com; h=date :from:to:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=main; bh=FQsKg12vqZxB mgz54WXLdLWWznQ=; b=Fxl2Su1I1tKN7GNOCmLNMwUVCOM47DT6dJPE50EMRRDm 0VilaLF2TN4L9S54GmYB437TOyioepN7oJRajebTBgyCUp5/rLAxWkVqAjvLLbb0 91j8GEvveez7RvfUbL1czUIzdxDzW0xHsDvnsKJcSjWVsaSlCbcSxVV8sAzGKdI7 Ke1etcLKMnka8iJNZMn25ukSLX9QCge4fYiY2pTGOn4DRhePwfZfESVhWjT2WCUx 1G9eZL9irW6uCkj3gX4vazoO9FK4Llw4y3uxSnK0dnLuI+4DdOEsqE0PhN8LSVz7 0Y5A9yfGlUDHGwzInBrMoVxJf2JeWicyXdM663nPZA== X-Scanned-By: CanIt (www . roaringpenguin . com) X-Scanned-By: MIMEDefang 2.75 on 192.168.10.23 X-Spam-Score: undef - relay 192.168.10.23 marked with skip_spam_scan X-CanIt-Geo: No geolocation information available for 192.168.10.23 X-CanItPRO-Stream: outgoing (inherits from default) X-CanIt-Archive-Cluster: SQVyZJxqklY5buiWXYCN4T/BjiM X-CanIt-Archived-As: base/20150226 / 01NV2Itqv X-Pg-Spam-Score: -1.0 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Hi, I posted this a couple of weeks ago and no response... I guess it's quite mysterious. Anyway, behavior is consistent. It seems that long-running transactions on the primary (even read-only ones, because in my case it's a pg_dump) can block subsequent transactions from appearing on the hot-standby until the first transaction finishes. Is this a known limitation? I run 9.1; is it still present in 9.4? Regards, David. ======================================================================== [...] > I have a monitoring script that tests the actual delay for a > transaction on the master to appear on the hot-standby. Every few > minutes, my script runs an update on the master and then sits in a > loop checking how long it takes to appear on the hot-standby. 99% of > the time, it's less than a second. > But every once in a while, the time spikes dramatically, to hundreds > or thousands of seconds, and that's too long... the delay-tolerant > queries are not *that* delay-tolerant, so we switch to sending them > all to the master. > See the graph: http://ibin.co/1rdm4ekiWmpM [...] -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin