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 1pKBi3-0002rk-P9 for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Jan 2023 05:19:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pKBi1-0001EZ-Jw for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Jan 2023 05:19:01 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pKBi1-00018k-3Q for pgsql-hackers@lists.postgresql.org; Tue, 24 Jan 2023 05:19:01 +0000 Received: from mail-oa1-x35.google.com ([2001:4860:4864:20::35]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pKBhu-00020S-Bi for pgsql-hackers@postgresql.org; Tue, 24 Jan 2023 05:18:59 +0000 Received: by mail-oa1-x35.google.com with SMTP id 586e51a60fabf-15b9c93848dso16568712fac.1 for ; Mon, 23 Jan 2023 21:18:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=nT4asYLIX6vPzPX0R+ixEc8PDmGzFtpeCj4YbX4RSRY=; b=qyI7UbJRaYxmV0J+G1nIoiKSI/OIQhgBwqrzPWK1deTbSwhd2wtZ/Jjr5txXpXxD1U vcDlyOBXqhi0ijE0KVKZAS9WVIb1/YzSL+XAnp4cQJouZcD+4jvxr/ddMMGNST4KdY6k xCRLTKoAxpVTax/BMr3sBnj92+uR2MX5DYzzGnIg7Vmy/0mSFeJqj3c1YtAVCKbs6RbL nKrZ3ypKDZtha59WQc07MWxutNuINQlWjzFHLmM0EgQrz8NZkM4mNe0Lg8i/FixIkc7D 8ezozlRW8qExnJ22BvzhbXL83Idc5t+DIIrurNecRq+OczKQ/Rn/RiE39akcYupOo2hS Sr5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=nT4asYLIX6vPzPX0R+ixEc8PDmGzFtpeCj4YbX4RSRY=; b=NJcqloe7UqnkUvLBHSYSaz8aunxVB2FBQhWFsmvQuqIMDJDqWsbMLSvcCVpdVXAAjR n6rJjF5WiynqxPO5Z6JqG8KH4xppuly+6V52EIwVJpVe6Gp+xpI7khirxyQoET9gPvAp yDUW1OnHFO67YTVFuE4vW+PRY2jJThMqZJiM8csKitI6XQhRp27LG9Ghesd4LPttq80S Mrl6akEtQyuFsivbFdVtZFEwiy509vchfWwQx/ftERtyVszfmcI+MPQrrCwEg1qka0bM 0NGN9NmxseVLEFvnWik7Pd6DDL7P39kmDQuP5eFU33dXlPlCoX9/XC63mAUbM8/DEswb 84uQ== X-Gm-Message-State: AFqh2krXhYnao2ZVeRnoebfUkvOSsrRvnRDAO8XMWy3XrVlzmV3SAQU8 wXXuIIQGYjgnQ9wEI9EG2a+mQ3HydUbxpoL74rg= X-Google-Smtp-Source: AMrXdXt1E6uxuiEEd78mdQlF1ZqWHPQViHZjDYodr5OlCVbXxmHYVH9s3SsCyJ9cwqdMr1A+3H0hBoG5hBo+rnVzJu8= X-Received: by 2002:a05:6871:4045:b0:15f:2e5:96a7 with SMTP id ky5-20020a056871404500b0015f02e596a7mr2266184oab.261.1674537533680; Mon, 23 Jan 2023 21:18:53 -0800 (PST) MIME-Version: 1.0 References: <20230112.120338.534662300633460797.horikyota.ntt@gmail.com> In-Reply-To: From: Amit Kapila Date: Tue, 24 Jan 2023 10:48:42 +0530 Message-ID: Subject: Re: Time delayed LR (WAS Re: logical replication restrictions) To: Euler Taveira Cc: "osumi.takamichi@fujitsu.com" , Peter Smith , vignesh C , Kyotaro Horiguchi , "kuroda.hayato@fujitsu.com" , "shveta.malik@gmail.com" , Dilip Kumar , Melih Mutlu , Andres Freund , Marcos Pegoraro , pgsql-hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Jan 24, 2023 at 5:02 AM Euler Taveira wrote: > > On Sun, Jan 22, 2023, at 9:42 AM, Takamichi Osumi (Fujitsu) wrote: > > > Attached the updated patch v19. > > [I haven't been following this thread for a long time...] > > Good to know that you keep improving this patch. I have a few suggestions that > were easier to provide a patch on top of your latest patch than to provide an > inline suggestions. > Euler, thanks for your comments. We have an existing problem related to shutdown which impacts this patch. The problem is that during shutdown on the publisher, we wait for all the WAL to be sent and flushed on the subscriber. Now, if we user has configured a long value for min_apply_delay on the subscriber then the shutdown won't be successful. This can happen even today if the subscriber waits for some lock during the apply. This is not so much a problem with physical replication because there we have a separate process to first flush the WAL. This problem has been discussed in a separate thread as well. See [1]. It is important to reach conclusion even if we just want to document it. So, your thoughts on that other thread can help us to make it move forward. [1] - https://www.postgresql.org/message-id/TYAPR01MB586668E50FC2447AD7F92491F5E89%40TYAPR01MB5866.jpnprd01.prod.outlook.com -- With Regards, Amit Kapila.