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.96) (envelope-from ) id 1w7j44-005dNP-1h for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Apr 2026 00:04:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w7j40-00DtIX-2j for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Apr 2026 00:04:05 +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.96) (envelope-from ) id 1w7j40-00DtIP-1J for pgsql-hackers@lists.postgresql.org; Wed, 01 Apr 2026 00:04:04 +0000 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w7j3y-000000023DG-32qj for pgsql-hackers@lists.postgresql.org; Wed, 01 Apr 2026 00:04:03 +0000 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-59dcdf60427so6871062e87.3 for ; Tue, 31 Mar 2026 17:04:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1775001840; cv=none; d=google.com; s=arc-20240605; b=exguqAGMriWz/csqm1eDMIn6jy5gOETbKZk+8UJ9UipgZyh3V0WWTO9E3Qh0dEIbFt hGP+orMja59PejtECiGlXMViVSyoy3lm6SGK2WcAxPgEmQZx/okECPCgSCDDZ7xZ1plw wAHLNp/+V6b+MMN0UFYAw0GDCH5vExZzdYSoB9bJsyvhlGEkjoJLxUSWOYHMv1Bdxy9h tyOcAhTpC0Zvxdhjv3TA7TIdDaBuxUbVAbhKMyFRn3yqfRSyBKd916trpHwPGJ1+0XAC 7npi5liFPSKKAnpUHkCbiVtHX345MGneNS1oq9AZl40ExBhIFgNemzag1GXlTpHzD20R ctgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=soWMI5ItB+LDmw7IkWOPDeLQKBAUREUnF2aVjq4tAYA=; fh=iV4wFHJqPgkKgkkrqYlSOOHNEtntBU6SUsvI/qMpYP0=; b=LUILQar08fgmSjDc+WtzvcJHkOGN5KPQLk2rkti/ICNB3Xt35rp9wWXL2/uX5wjHhK JRGQ/Y3dp3ZjpzT6K3kXsWlyRwI9Rn2QEUq1B4yaFJrKkIrh3t4HudBqW+0+N+kDQMkm xaA5hBmD8MfmCmyVdFzForf8pTV5KVxpDFNzPb9CuQZlYDF2cQ7OE/jB/mCvU8wsVYxj SB71+YvSi7H5eNlzbjMKSNtOPTVFp7NZZDzNWc6tXDlpxjJdN+mqxJqi4OxGf5ZwJ2DR zGDJ/9q1UQxULBNyLMSQ1mZfy3RP2JY8BTUOwv1OyAWFJ2EmJIZ+WTCr5gxP7/0dKt7j DyDw==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775001840; x=1775606640; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=soWMI5ItB+LDmw7IkWOPDeLQKBAUREUnF2aVjq4tAYA=; b=nGTKRA/c9kpZtM3/wmyDQwb5YFGONrTbuh1tcDNmQPuxJRHq6NKXiB6X4yy5eiwAJ8 BbE1QzT2wBVH38i2mRreY9P7KVkUrVUCo9vu+5srGQSyl9Z+v0FySnl0IC6ALMksBcus vpe6pxQ073/vH0q9LyQJuBnEzjsLfkzziE9olyKvhhvsDbfNPkrBfEKzGco93GIPC7F6 cDfj6FNb8gyQjX3PEh4IHh4CE7AftIoMXrl5yYK/7no2Nna+TpmwQF1qovrl2S2/LgXb 0Pc70LfipuS5peYIzsx5LU4rvnCrmEFMIWKGfkZPWR3kLWtsKAulHq26Pm4JkF29OtfW bxhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775001840; x=1775606640; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=soWMI5ItB+LDmw7IkWOPDeLQKBAUREUnF2aVjq4tAYA=; b=RDe1oWNpCgupUlaUQioqeWTQAxH8P7JQSJVVNYEzWtXXMKWvWXQm6eVZHRY98PUpWX FgOhkl/hu/FofRfYj3fBmwMx23si84aVA9nvUq2mAg3gYZTNZMVMr9TFkMfO7XvQPPc+ rejw2dOXAYH601sroHmw6kjaganSMgc72jUnTXj9HIBWByh0S2NVVKBDUlDsNV3QvWTU V/braKB6KXw9Z3XebsD6CxJudMZ+S9WVIx9fGBwe6HvqZfSrhJrfvxWr6eMVaiHMllUL hZHhMt+fLdietjtNZfIuJkEdMd+3Tbk/TfQ546+HF3vMJo9CmjeMyhQBOX7ro1E53PPe cxZg== X-Forwarded-Encrypted: i=1; AJvYcCVJ3XvzixoCB8GQKImh6Vuu56qk1prf8eqmqjNP8RN7SpV+Olc31KeH/ezREicaon7V5TwVT6QuaRNPxNAO@lists.postgresql.org X-Gm-Message-State: AOJu0YwsXUysy0WudcfOCoKyfF0emcXlfYREZyNTz1patPxDqsechJRn FXc6yL1H8DWbqCswZjneqWy6b6Bcf1B0kzaZ+Kobi+qagM3fmiWqhWnOCqum5SL7jScx29apD5c qETXpj6vAiEhIDT+4QQOzXKcMejip58Q= X-Gm-Gg: ATEYQzwUl6dIn9iW6MwzedvVxysUfacOHM6NMtSdFmmeLEWftvMp1pazlvhkWYkk/k/ 3U0pw2VVLX7dZgYMMuRE4dESHrKInI36en/DNXoK96jzz2e6AvveL0pR3lx6BJZq5QDo5+cocIa 9pRQ18un6mKraZDkb86XUv7w6Oi+7f2MZVF18Kt709Sw2e/ILAsnnnip66wM361AJcY1UXmM9bL WrLQ/l2ow2RjvIdoJ06EB4iCyzTsfbpLQ7K3JjP8XR2fFmAqWtDONWIX8gihWaV/I8zIwki2oTp j1cyKjty X-Received: by 2002:a05:6512:3b8a:b0:5a2:a3c0:ac4c with SMTP id 2adb3069b0e04-5a2c1ef9b94mr437074e87.14.1775001839683; Tue, 31 Mar 2026 17:03:59 -0700 (PDT) MIME-Version: 1.0 References: <0c28fbd1-3320-4e9b-815c-6d62753aa063@wi3ck.info> In-Reply-To: From: Masahiko Sawada Date: Tue, 31 Mar 2026 17:03:23 -0700 X-Gm-Features: AQROBzApObdexepMxSehC7Kv0wTShN8UVjYyZDNxv34uTn5gpFUy1SmCD_srKjU Message-ID: Subject: Re: Initial COPY of Logical Replication is too slow To: Marcos Pegoraro Cc: Amit Kapila , "Hayato Kuroda (Fujitsu)" , Jan Wieck , "pgsql-hackers@lists.postgresql.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Mar 27, 2026 at 6:07=E2=80=AFAM Marcos Pegoraro = wrote: > > Em sex., 27 de mar. de 2026 =C3=A0s 03:20, Masahiko Sawada escreveu: >> >> I've attached the updated patch. I believe I've addressed all comments >> I got so far. In addition to that, I've refactored >> is_table_publishable_in_publication() and added more regression tests. > > > Today I had to create a few more schemas and see that problem again, how = the publisher is affected, almost crashing due to the overload. > That was because max_sync_workers_per_subscription was set to 10, which c= aused 10 simultaneous connections to call this function immediately after t= he refresh publication command. > Wouldn't it be good to document on this GUC that if your publisher server= is running version <=3D 18 then is it advisable to set this GUC to a reall= y low value ? > Because ok, version 19 is fine, will be covered, but all publisher server= s that are not updated will continue to have this trouble. > The publisher will be severely penalized when the subscription refreshes = its publication. > > What do you think, change something on DOCs too ? I agree that the publisher overload is a serious issue that users should be aware of. But I'm not sure it's a good idea to broadly suggest lowing the GUC value as it ultimatly depends on multiple factors. A value of 10 or more is perfectly fine depending on the hardware and the number of tables etc. A definition of a large number of tables also varies on systems. I guess the release note would be a better place to mention this. Regards, --=20 Masahiko Sawada Amazon Web Services: https://aws.amazon.com