Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m3XU2-0006A1-0g for pgsql-general@arkaria.postgresql.org; Wed, 14 Jul 2021 05:30:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m3XU0-000122-R6 for pgsql-general@arkaria.postgresql.org; Wed, 14 Jul 2021 05:30:56 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m3XU0-00011u-IF for pgsql-general@lists.postgresql.org; Wed, 14 Jul 2021 05:30:56 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1m3XTy-0001RB-34 for pgsql-general@lists.postgresql.org; Wed, 14 Jul 2021 05:30:55 +0000 Received: by mail-wr1-x435.google.com with SMTP id m2so1616224wrq.2 for ; Tue, 13 Jul 2021 22:30:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=RTOA2nXhtior8yDuyuOYR0bZ2ZqdLUTKvQKqN5kpeQY=; b=YrnglOTVXg8OVb6Hpv2ywwUYc1yIC4gzIFviBF3CprmOxa0HHn2VHP5Hd9sGAT6n2T EAXz0fh9AHBNNzTTFZkr2TknWAMRfO/K9mH6aMyrLgq+FWAtznTuRp7psZT6GPyyXShM DJ96jdaeDyHvtKi/BTIQq20GhPPCbPp0SupdVyKFI0ESSiXUoj+rCyd/wVeD01UPn2OQ Q96z61aP2/Uw1k2fxiKGYyYQKHEdsV0M/G+jFRK59xayLbJAjgROFecyZCIwnqTFDAgU gbqkfUbWincXVZi430ZnIcNjZJ9zSZKlK5zAjU2D+IP5RhdkiwXABIVeqNgKP9mnhQao 2y3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=RTOA2nXhtior8yDuyuOYR0bZ2ZqdLUTKvQKqN5kpeQY=; b=FGk8QY31zbZmig9MgcXLKDvm9Bo8xIp1OyCMY+WcG+Rc0CobuKAJK6ZJ5ukempRX1R q/GGcMKq2ySMaYCJGnRxbtIBRDkCfTW5jUC2Z297gFCfPco+tVAuZrMuFPbgflxreHMB 4KMZWWWhMfKH71KqH2rkGtubJI7LcLfhPUUujSXHezETYgCBSzB1AktHCKosxEY3Cmz1 aTDvPtTh1Dh8jr+WvKYaXjFeJPCwX90ybCieqizGMdDKFJMBrRufpUWfCXsPFg6zdOnd g/AbJEvSvvvTLCbvMZWR7fZQRutzm51J0Y/5FRFpUfxzrLTyjHOSYANiLEawWCm1X8Uv 98YA== X-Gm-Message-State: AOAM533RzgOtwggwUeMqNOgWLuOLOFVIprO1MIKSogVAOfFiqPXm1cDj mZysQTrpk5gyMMZn/HSgafpMGA== X-Google-Smtp-Source: ABdhPJwoLhrUnR/SSyBphvz6TsjYB6m8GLioNkzGghI/1+23XaiYjlBDacY/wpdZb0kAm73ko3kx5g== X-Received: by 2002:adf:eed0:: with SMTP id a16mr10057913wrp.324.1626240652698; Tue, 13 Jul 2021 22:30:52 -0700 (PDT) Received: from localhost.localdomain (217-149-168-54.nat.highway.telekom.at. [217.149.168.54]) by smtp.gmail.com with ESMTPSA id f12sm3979578wmg.16.2021.07.13.22.30.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jul 2021 22:30:52 -0700 (PDT) Message-ID: <0d5784f69c8f3b61523917b7ee5ea12a042bf478.camel@cybertec.at> Subject: Re: PostgreSQL 9.2 high replication lag From: Laurenz Albe To: "David G. Johnston" , Lucas Cc: "pgsql-general@lists.postgresql.org" Date: Wed, 14 Jul 2021 07:30:51 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 2021-07-13 at 20:14 -0700, David G. Johnston wrote: > On Tue, Jul 13, 2021 at 8:01 PM Lucas wrote: > > According to the documentation, max_standby_streaming_delay is a configuration parameter > > determining how long a standby server should wait before canceling queries that conflict > > with pending WAL entries received via streaming replication. > > > > My question then is: Which queries, if the slave can only receive SELECTs? > > The select queries... > > Follow the link in the docs for max_stanbdy_steaming_delay to: > > https://www.postgresql.org/docs/current/hot-standby.html#HOT-STANDBY-CONFLICT > > for the details. Perhaps you might find the following article interesting, where I tried to discuss this topic in some depth: https://www.cybertec-postgresql.com/en/streaming-replication-conflicts-in-postgresql/ Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com