Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h1Oz3-0006ml-QE for pgsql-general@arkaria.postgresql.org; Wed, 06 Mar 2019 05:20:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h1Oz2-0004FK-8g for pgsql-general@arkaria.postgresql.org; Wed, 06 Mar 2019 05:20:48 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h1Oz1-0004C0-TA for pgsql-general@lists.postgresql.org; Wed, 06 Mar 2019 05:20:48 +0000 Received: from mail.i-mark.de ([188.138.104.222]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h1Oyz-00008G-HA for pgsql-general@lists.postgresql.org; Wed, 06 Mar 2019 05:20:46 +0000 Received: from [192.168.178.20] (unknown [185.38.49.17]) by mail.i-mark.de (Postfix) with ESMTPSA id 54C811583973 for ; Wed, 6 Mar 2019 06:20:42 +0100 (CET) Authentication-Results: loft7616.startdedicated.de; spf=pass (sender IP is 185.38.49.17) smtp.mailfrom=andreas@a-kretschmer.de smtp.helo=[192.168.178.20] Received-SPF: pass (loft7616.startdedicated.de: connection is authenticated) Subject: Re: Non-pausing table scan on 9.6 replica? To: pgsql-general@lists.postgresql.org References: From: Andreas Kretschmer Message-ID: Date: Wed, 6 Mar 2019 06:20:43 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Am 06.03.19 um 01:26 schrieb Mark Fletcher: > Hi All, > > On a 9.6 streaming replica, we do table scans for stats and other > things. During these scans, the replication is paused (the > 'recovering' postgres process has 'waiting' appended to it). We're not > using transactions with these scans. Is there anything we can do to > prevent the pausing? > > have you set ```max_standby_streaming_delay``? The default is 30 seconds, which means that this will be the maximum time allowed for a replication lag caused by a conflicting query. You can use ``hot_standby_feedback = on``, but the downside will be more bloat on the tables. Regards, Andreas -- 2ndQuadrant - The PostgreSQL Support Company. www.2ndQuadrant.com