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 1mxBNl-0003Nm-QE for pgsql-general@arkaria.postgresql.org; Tue, 14 Dec 2021 17:14:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mxBNk-0001B8-4Z for pgsql-general@arkaria.postgresql.org; Tue, 14 Dec 2021 17:14:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mxBNj-0001Ax-QU for pgsql-general@lists.postgresql.org; Tue, 14 Dec 2021 17:14:27 +0000 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mxBNg-0004CO-Mc for pgsql-general@lists.postgresql.org; Tue, 14 Dec 2021 17:14:27 +0000 Received: by mail-wr1-x432.google.com with SMTP id e5so158562wrc.5 for ; Tue, 14 Dec 2021 09:14:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20210112.gappssmtp.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=F5NH0Z+n/XNzwazERMpnoBOhkC9KeT60NN1HEok300Q=; b=EZYRoyITPMjIZJSkRZdMQiPLJ2afTElJVnCifL+pXnH9qXYDDvQDirNzdQBqabAocT BW//hGc55Hh+Nb3/35TnEptnlS/OUXT7VxqaT51s8M5JI/tC/ICAAA5DfQSQiTDcJzTj 2g1m8gk72HA0ai64bg+K6a3gmSxKal+7SYeiscLGmjMx/oY60O1ic7wHt4EFVACwRFC6 uEK385M7OyuCLNumvG1to8kVEt/bI1ssm04XmGBvISI7PDu6hofVbL9XCLsz6suUT8Za kG/nAcxFBeaHkCUBc5mdEbgurZNmH9izHQ/GPybIKmkgXEoZfKSpLQB964p/D5X4rgDK KzvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=F5NH0Z+n/XNzwazERMpnoBOhkC9KeT60NN1HEok300Q=; b=pMixCX3GGw2LgyOEDNE9R3x+MlcjrfJsDTgPagRLcoBhDC74j2X+YWQRPnbltDZ0oG PnEJr65BAUOPGdc6TXztdLxyNamnWov04tvcBLJ9pgFAt7rALSFZxZvelyRAOxG/4iF8 ikmQ5GgZzH4ia+RtpkimGdV8GXa/kAz+vUS+iRv12PW/Hx4G6Dh39ll9dRPe7EDPdwx6 x25bFlhVCkrjqaf+E8dQHRxTZ83otLW3UdnBA0I8W58MGXGDcf2k1r5Ngk4cyuXd+8XH yW+ame9h5w9zvK7EIJVjk6o7sv8MhuUEGHyycMlzn6zN36rBwKNPjeXvqrAgwD7c2ZIB d36g== X-Gm-Message-State: AOAM531TBKltQPm+sGDM4v47CzCCWWro/2aNEOFnRXOYA4Bs2HqRe0BC m+eC1DcKHZx9JcSqaaXhF9J+ZA== X-Google-Smtp-Source: ABdhPJzjsoqXQBUeqKn6gCLSqJ+bxyB5+BtImXXyuDU9JdAC8PpRYG5w1plXsOeTYOpgGCitY8S1Ew== X-Received: by 2002:adf:a48e:: with SMTP id g14mr304024wrb.474.1639502063882; Tue, 14 Dec 2021 09:14:23 -0800 (PST) Received: from localhost.localdomain (dynamic-ebqd4mvd0ob13yqgy-pd01.res.v6.highway.a1.net. [2001:871:5e:4f9c:dc4:9b68:294f:f182]) by smtp.gmail.com with ESMTPSA id d16sm373484wrv.111.2021.12.14.09.14.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Dec 2021 09:14:23 -0800 (PST) Message-ID: <86b7e09ff47c45f4455bc1421878ff33d505049c.camel@cybertec.at> Subject: Re: locks within select From: Laurenz Albe To: Marc Millas , "David G. Johnston" Cc: "pgsql-general@lists.postgresql.org" Date: Tue, 14 Dec 2021 18:14:22 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.4 (3.40.4-2.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 2021-12-14 at 13:38 +0100, Marc Millas wrote: > but... when you do setup a streaming replication, there is, in postgresql.conf, a variable:  > max_standby_streaming_delay = 30s # max delay before canceling queries when reading streaming WAL; > > as the secondary is, by nature, read only, I was wondering why it can be necessary to cancel a read request... Perhaps this can explain some of what is going on: https://www.cybertec-postgresql.com/en/streaming-replication-conflicts-in-postgresql/ Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com