Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ufRc8-007NED-En for pgsql-general@arkaria.postgresql.org; Fri, 25 Jul 2025 23:14:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1ufRb8-005Pgg-8W for pgsql-general@arkaria.postgresql.org; Fri, 25 Jul 2025 23:13:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ufRb7-005PgW-Ts for pgsql-general@lists.postgresql.org; Fri, 25 Jul 2025 23:13:06 +0000 Received: from mail-il1-x12a.google.com ([2607:f8b0:4864:20::12a]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ufRb6-000n7M-01 for pgsql-general@lists.postgresql.org; Fri, 25 Jul 2025 23:13:05 +0000 Received: by mail-il1-x12a.google.com with SMTP id e9e14a558f8ab-3e3c34a9b4cso14271845ab.3 for ; Fri, 25 Jul 2025 16:13:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1753485183; x=1754089983; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=YJZZiCwbxksIU0YCdzuedP8T5X+tc/Bk0qvpGG3tFUc=; b=CXWpZ7R2dpmWfi6ES3g4tLZSF+7UyYEEFMhTZLxHe/J3MVAtrBMtM7IOtpHZysPbtz gK2LaSsbouFPB5+T47Vbclh0xCkx7qPpPy9npBlh+JJMS9qNFCYRaB7y03i7Ll/8gwve P3ItbABOQO5E8Ss/X4aXJ4/osZsE/AQ5HPuWr/gCoa9nbujVn88DB5H5zKHla5VaCX8c ok2AngAxSpHY1rlYmBcZaoUPimPgPe7qvmNaSOQXJg7QoeMK88OURj1oZ/nljSLso41X gO8HGXP0S0sFfy+70czK+B1go1IzyQ+8FEAasecErJezQaaegV0C9iBXNXYLb/D4iIgf DdiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753485183; x=1754089983; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YJZZiCwbxksIU0YCdzuedP8T5X+tc/Bk0qvpGG3tFUc=; b=w+EkBMozifmOFknPo4YOKTTD3bKdMH7uPakVYiTKMfsSqkODGrWhbflA1kPZEXOPRk FvbyVfR0oNh+H1jQK5WVyKad85pLzS7IAPcf95DbbGnM+fyojQj5E+VjNClorok3ixgp VICE3nTJ7A/cMwuFlX7jJeWUjvemwnfISfZuIUegNlE/iHBze9hOUN8Zww/ImNHez8Hx zxA0SRLamQxe6mveIxdNmmkxfgo4Eda+92OUPtIjgdYZvFnTLmKv/Wdk9uQhKDAtLcxJ AJpbO26eXRVaG5QfbDP+Y1mMzlmNVOP0iUdNPSOFB+oQBYtQZOvFvbh1XXrt/Qn4XqzL aYWw== X-Forwarded-Encrypted: i=1; AJvYcCU4i7H3FvBJdPZ3xt6J+WkLWcQii76hXFfkFloUA6wIoNLJIyXXbAt+rX3Rl5XxeZ70UkYcPubWKReBYyfe@lists.postgresql.org X-Gm-Message-State: AOJu0YxcDeZxa57jiShgIWza5Y9cZcM3vcqjtF6z6EaMv1hMjFEZBtUo DWYGZ2tg19V7Fj+a2m8F9HDsCmcqblRXgKRATH2WEM01v8rPXcGXAukAvr48I72rv+gbuwTD1/F Oa59hfPsoUne+xEBHLjHA+UI0zA5G/yc= X-Gm-Gg: ASbGncv7UVcMdLuBsJRQFCRmXr7wRw8hPVCuJEmpw06sQA9tZ8r0MCCGvCy6JTjxrUw yGiYEB3/42x7hG3G9Laxo+oBIPA18pp7YVw7erWr8P2K3H35SM6mDOyRGB9JUQNfAaB2LEA7R1h Ab7wco1ES9/Q72SlvfvCmRfhgqNXlD5UUSYm2zmT/zieQZVoXb0+MnbU4UH1T37o1NTEIzZUqz1 QZCSWExsoH4wDv59M6E7iAa1Hwal5ySVSvpdqhBBA== X-Google-Smtp-Source: AGHT+IHAOGzd96M3boLxPiEX0M11NrpR6V0xD8XxdSQZIr+e3xZy8ShECLAtN0JL5uNRGRr7GlfOonBu+6T4pLWXpzY= X-Received: by 2002:a05:6e02:1c2c:b0:3e3:cbfd:5371 with SMTP id e9e14a558f8ab-3e3cbfd5477mr17854855ab.16.1753485182957; Fri, 25 Jul 2025 16:13:02 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Greg Sabino Mullane Date: Fri, 25 Jul 2025 19:12:26 -0400 X-Gm-Features: Ac12FXynrDp8bTjt9VZ8ETt0OdwKSMWW8zqvq0D2PujBqSjoRc7_gEpFeOc1xBQ Message-ID: Subject: Re: Possible causes of high_replay lag, given replication settings? To: Jon Zeppieri Cc: Nick Cleaton , pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary="00000000000072fdb8063ac915b7" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000072fdb8063ac915b7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jul 25, 2025 at 9:57=E2=80=AFAM Jon Zeppieri w= rote: > Thanks for the response, Nick. I'm curious why the situation you describe > wouldn't also lead to the write_lag and flush_lag also being > high. If the problem is simply keeping up with the primary, wouldn't you > expect all three lag times to be elevated? > No - write and flush are pretty quick and simple, it's just putting the WAL onto the local disk. Replay involves a lot more work as we have to parse the WAL and apply the changes, which means doing a lot of I/O across many files. Still, *hours* to me indicates more than just a lot of extra traffic. Check that recovery_min_apply_delay is still 0, then log onto the replica and see what's going on with regards to open transactions and locks= . Cheers, Greg -- Crunchy Data - https://www.crunchydata.com Enterprise Postgres Software Products & Tech Support --00000000000072fdb8063ac915b7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, Jul 25, 2025 at 9:57=E2=80=AFAM J= on Zeppieri <zeppieri@gmail.com> wrote:
--00000000000072fdb8063ac915b7--