Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bf7gq-0005Fq-BZ for pgsql-admin@arkaria.postgresql.org; Wed, 31 Aug 2016 15:44:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bf7gp-0008B5-Uk for pgsql-admin@arkaria.postgresql.org; Wed, 31 Aug 2016 15:44:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bf7gp-0008Ab-4r for pgsql-admin@postgresql.org; Wed, 31 Aug 2016 15:44:35 +0000 Received: from www.ipv6.roaringpenguin.com ([2607:f748:1200:fb:70:38:112:54] helo=colo3.roaringpenguin.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bf7gj-0000PO-QB for pgsql-admin@postgresql.org; Wed, 31 Aug 2016 15:44:33 +0000 Received: from vanadium.roaringpenguin.com ([192.168.10.23]) by colo3.roaringpenguin.com (8.14.4/8.14.4/Debian-8) with ESMTP id u7VFiLQE014698 for ; Wed, 31 Aug 2016 11:44:22 -0400 Received: from hydrogen.roaringpenguin.com (dfs@hydrogen.roaringpenguin.com [192.168.10.1]) by vanadium.roaringpenguin.com (8.14.4/8.14.4/Debian-8) with ESMTP id u7VFiIru009051 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Wed, 31 Aug 2016 11:44:18 -0400 Date: Wed, 31 Aug 2016 11:44:17 -0400 From: Dianne Skoll To: pgsql-admin@postgresql.org Subject: What causes streaming replication delay? Message-ID: <20160831114417.7fc1040d@hydrogen.roaringpenguin.com> Organization: Roaring Penguin Software Inc. X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: CanIt (www . roaringpenguin . com) X-Scanned-By: MIMEDefang 2.78 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/20160831 / 01RBPIlfk DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=roaringpenguin.com; h= date:from:to:subject:message-id:mime-version:content-type :content-transfer-encoding; s=canit; bh=TtPPRPREQ7zbhX3PtuWpx+JM QjSYToGr+/77F0OElA0=; b=Idn+IQd/5DaV9vHDkdqhJriXnMgF1NP5S09BC47g XoWXIK7Pa3/P3UC5pMl39x6+1Q9YL2nMwqOBKhKLz0sCunnHWwfhHxq3nNlFaJhZ nzXQEHU4DWGC9Tipu3GnBCawAmVAvfhQHnuETqD05rafp1hWAZapVForWZGmDcNn 4OP3b0Rrc6yxK12E9NvQYgXiURGjA1d0RE1hEJjEI1Cpo025Sw6ZziV9/r6RpzsI x1WGHWqePaBLyX1pmfJTsFuPYcaaWooD87kYUYY7Xouu0SRhGKJqrgKceFtAvKrG Vg3woeAd3FO3AyGaZHR8KfqiliQUXgpgISomSoYoT2PzLw== X-Pg-Spam-Score: -8.5 (--------) 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 have a problem that's driving me insane. I have two PostgreSQL 9.1 installations (yes, I know... very old.) One is configured as a master and the other is a streaming-replication hot-standby that supports read-only queries. Every now and then, although the standby claims to be streaming transactions if you look with "ps", it seems to stall and the replication delay grows by one second for each second of elapsed time. If I restart the hot-standby, it consumes WAL files and very quickly catches up. And then a few minutes later, it happens again. So, what are the possible causes of this behaviour? There are no long transactions on the standby, nor on the master. And how can I find out exactly what query is causing the problem, assuming it's a query? The relevant settings in the hot-standby postgresql.conf are: hot_standby = on max_standby_archive_delay = 10s max_standby_streaming_delay = 10s hot_standby_feedback = on and on the master: wal_level = hot_standby archive_mode = on archive_command = (a command to send WAL files to the standby) max_wal_senders = 8 and all other parameters are at their defaults. Regards, Dianne. -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin