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 1n2QyX-00049u-9y for pgsql-admin@arkaria.postgresql.org; Wed, 29 Dec 2021 04:54:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n2QyV-0000bT-LE for pgsql-admin@arkaria.postgresql.org; Wed, 29 Dec 2021 04:54:07 +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 1n2QyV-0000bI-7N for pgsql-admin@lists.postgresql.org; Wed, 29 Dec 2021 04:54:07 +0000 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1n2QyO-0002DM-0O for pgsql-admin@lists.postgresql.org; Wed, 29 Dec 2021 04:54:06 +0000 Received: by mail-wr1-x436.google.com with SMTP id w20so33095860wra.9 for ; Tue, 28 Dec 2021 20:53:59 -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:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=No2HRvmYIA2btrDjnm99lrRNOJftFDgix4sbgTT3lEI=; b=7PKxgmh3mbHgw4yTSW8OOW6Dlkqnq5Jv9LOV9Fn+bTHL3l17bKhP6msZnachtKT2Tn XkCxAY/IRzWTRmBiNuNOL0Z0CCcaExVh9P7rUAhR/m6giQfCJiotaADXeZcchnXQ/p2k ZzoeiUEUoY00HZ11qzvxwJoKzEzR9HyGt2kGhQ1V+VNu7tXjcnq1atZ5g6/aBxNyW+DG 7R/TqB9DqhANaxzN5+8PF0LtOjuHZC0VVGO93//yHHwFR9h7LLkcER9h3ItsOH9qfOhU fQIDSdqWY2fjP9pNdRh4ErI8FYZBHgUBSVRYlOJkZiOK87+TRMabRpA9sTUlz+ZN/twt 39dg== 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:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=No2HRvmYIA2btrDjnm99lrRNOJftFDgix4sbgTT3lEI=; b=mwx0BKZWhNBPpeHjJ8eauZ4XBkcbxXlrPgcqTDT4QI2Nao7teUjq/IEeoYPiwaf+8p HXYiAp3PAx19q8eOIAmJ+v5/BsFGWkbP8I++h9uD/gt+iqCgG5m695GAp5FFrm/NZMGj 5Jf+qPm3AqwbjLUIO2Kov+ApaaLuYDMP+7twHmGRhyjq/Oo8MCyIIh+3ySxXOtzJ+UwT HKAeEqZNCsx2FqD9TzTc+MGSN76XuSzRK8TOYW3fzcPxX6ge4JIHHrY3QDa+a+WMjfmY w5KAdW/9HyivefslpcbqORxIeUTkqTeGMFI828lKZehenYPvcwoq1B4VbPgABlBVXn8L nk8g== X-Gm-Message-State: AOAM533i7hyDzgTROgVHBdcfyix54oYO7VvMiwwQuL31/NGTEKoEsUsW XpNOQxsKZZGU7CWIpFA1Y1KsNg== X-Google-Smtp-Source: ABdhPJyXOeJvfz4GsMnjMDnIFRGOk3dZ7ykTf9fDQoh3//t8xv1etxWeHGGPdnvGKoTX4+/hg3xSDA== X-Received: by 2002:a05:6000:1a8a:: with SMTP id f10mr19137741wry.246.1640753638243; Tue, 28 Dec 2021 20:53:58 -0800 (PST) Received: from localhost.localdomain (178-190-178-241.adsl.highway.telekom.at. [178.190.178.241]) by smtp.gmail.com with ESMTPSA id l2sm20269945wrs.43.2021.12.28.20.53.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Dec 2021 20:53:57 -0800 (PST) Message-ID: <9350d584fdedaee8161f40ee70798a7d443b3f2c.camel@cybertec.at> Subject: Re: postgresql replication replay lag From: Laurenz Albe To: Kenny Bachman , pgsql-admin@lists.postgresql.org Date: Wed, 29 Dec 2021 05:53:57 +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: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, 2021-12-27 at 19:22 +0300, Kenny Bachman wrote: > I have a 3-nodes Patroni cluster with PG 12.9. There is a replay lag on the third node. > I don't understand why there is lag. The replication view output is below : > > Extra info: There is no long-running query on the third node. > > Where can I check to detect what's causing this? On the lagging node, examine SELECT * FROM pg_stat_activity; That should show you what causes the lag. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com