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 1stTEB-00Gdyd-If for pgsql-general@arkaria.postgresql.org; Wed, 25 Sep 2024 14:42:52 +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 1stTEA-009YJ9-VC for pgsql-general@arkaria.postgresql.org; Wed, 25 Sep 2024 14:42:50 +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 1stTEA-009YIv-K9 for pgsql-general@lists.postgresql.org; Wed, 25 Sep 2024 14:42:50 +0000 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1stTE7-0010Eq-TI for pgsql-general@lists.postgresql.org; Wed, 25 Sep 2024 14:42:49 +0000 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2f75aaaade6so73419781fa.1 for ; Wed, 25 Sep 2024 07:42:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727275366; x=1727880166; 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=b8jmBsSPGYRVpRSKi5hkCJU/co8R3I+nGfNZrSPU2GM=; b=WdcZcklSju2Un0YLJrcZIp35lAcWc5rDpywvBM3kAeSj5hjcDLw1sS8Wk8hP9XD2of xaVR2xdaIUmmaZQdkzmkwKeO6QnERfwQpvL/7sjkNygDcHz1asBFYU5lDYKY4qbz9UoW 6qtJVKEd7y/6+idihjYHnltw8F/sXZYL4yQfHOgNnjhhU2xigwqAJBAQYRBrWDbgffVQ 8X5IKGoprwb1hKkV2wi3gyUQXkqSFHTgtz/BvoQyE7MSpg4zTLx8R6L+KPz/8ZF4cSOx auEtEcvqC35jDqiWcLHgo+waIaLu31bI0eYZ8wJREqfcPmAL7n2C1/1gi2a2YYB/RwJF BxTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727275366; x=1727880166; 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=b8jmBsSPGYRVpRSKi5hkCJU/co8R3I+nGfNZrSPU2GM=; b=X4iUii8BrIW33L0XK3HyVzVQUGUrWyrTx5itWPe3UqS2wVoweDJMVLgdEiWgMFZ19z PrWzR7pkzPhP6l/oVIMvwls78OVSo9JtvDShQz+zO6NjS2Y6ocaDeCU13cTBdq1eNdDV l18pR2sd238jHK9T7BFFOBm8sfxHzPUbCpePuGPr6kDifyjJ7N1E8YjJuikIQ+xDpAXr k0ubQUNeGT1/kEII2xSPtC1nB8ixLDcvf6kjplKuumgw/d2GCzOPE81q598F/0isZpbK k7G2NdfH8JhgDBfqwkRczZZYIoDFuFMvEDOZqjWx6dMOT6eBQhqeUz+8y/whX5jFHrZo pZyQ== X-Gm-Message-State: AOJu0YyUSL/mhuYPXQD59HAMi4bTqzis1IXo39JBCJVsDpXEdiEkcm/1 hnU4mPvgScmKE2lH0P2uujO25cidHhzmujtl6cbSJfS1dFxbcW4wRd6WXXkCekD0z0bCvWAYmtq noFTBhVMHHv5GbQQc/lmt4NCIXOi1+oSm X-Google-Smtp-Source: AGHT+IGcca0QFvLQ+cORfgpAjz1gmRELQd8z5G58Gark0G62AM22ulsenA+EZRq9OSkxuO5H+4h7MGwjwjS7+JtTbto= X-Received: by 2002:a05:651c:220e:b0:2f4:4d58:9edf with SMTP id 38308e7fff4ca-2f916003791mr20666081fa.20.1727275365501; Wed, 25 Sep 2024 07:42:45 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Greg Sabino Mullane Date: Wed, 25 Sep 2024 10:42:07 -0400 Message-ID: Subject: Re: Logical Replication Delay To: Ramakrishna m Cc: pgsql-general@lists.postgresql.org, ravisql09@gmail.com Content-Type: multipart/alternative; boundary="00000000000097166d0622f2a24e" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000097166d0622f2a24e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Sep 21, 2024 at 3:08=E2=80=AFPM Ramakrishna m = wrote: > I would greatly appreciate any suggestions you may have to help avoid > logical replication delays, whether through tuning database or operating > system parameters, or any other recommendations > In addition to the things already answered: * What is the use case for logical replication? I assume your local replicas are able to keep up just fine. * Check the nature of the work for problems, e.g. ORM doing unnecessary/redundant updates, maintaining indexes that are not really needed * Looks like your wal_segment_size was boosted to 1GB. What drove that change? * Yes, autovacuum could affect things - make sure log_autovacuum_min_durations is set Cheers, Greg --00000000000097166d0622f2a24e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable --00000000000097166d0622f2a24e--