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 1pIUVp-000762-O1 for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Jan 2023 12:59:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pIUVo-00016Y-KG for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Jan 2023 12:59:24 +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 1pIUVo-00016N-8j for pgsql-hackers@lists.postgresql.org; Thu, 19 Jan 2023 12:59:24 +0000 Received: from mail-ot1-x32d.google.com ([2607:f8b0:4864:20::32d]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pIUVh-00037y-RX for pgsql-hackers@postgresql.org; Thu, 19 Jan 2023 12:59:23 +0000 Received: by mail-ot1-x32d.google.com with SMTP id m18-20020a05683026d200b0068661404380so1162301otu.2 for ; Thu, 19 Jan 2023 04:59:17 -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=A2bD9JsnEuOk9SZGveUv48vCTYuQlfXwOHvEAVdunL8=; b=h4e6wReZ6gdAk8dimhD4KH2OZ1lPFP38alqjDgPQVOjy/WDy6W7Y2f4unQTHGJrHeq Urhaj/Dm7Cj4A81SdkSBQJxt1irfAXjM5dJup2mfdwHzBjDfwDVwF+5E9Pp9inmYGEcJ oxgUuUFvCsY97qU00a2lOPFiCV6lA4DI0pq+EOegE03IfqB83jO2JIbk5BTM0H+4oVga Y8POLk9Io/0kzPHqcd8lwOlY8ucha4Jh4sbV92HBYRyYUX7aFVKwzdcOWVMLq/ntDv3+ 4FxEJcCC2bu/iESyEJ62UiJFaWFN3wGcIZQsB+86yB/uRyLu7R3I7DvtaaDZZm3NXnk3 hKvQ== 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=A2bD9JsnEuOk9SZGveUv48vCTYuQlfXwOHvEAVdunL8=; b=lxo6PryBY/8WGBCd+j5K3c20lIJaQWFGQRubrNLoYfFBqG95hTu9qtggR5MgEflkbt MesUbueGfXJs1pbQl4+qzoA+yM5Kz9o4qd3Q6o7B0foQJgymJahFQUPgzGCn0ItGEZgs ruaFoyjVRrgcNi8lwAj4WVmsJwdLLo0BhuG199EDVKASgdc7XJnUclGte4emZGcXIYjO RKYzgk7Eh4CfG4qpnYjNdQ6Xy7BLN/JB8OZQf+zXA8fHG5MwUu3oYGwXnUv0Jzfd7pF3 LJxpzyADm/EaBKHqbHiMG5OzLdtqvMossFEhlucY2ZodFSoAlRUCHm8Q/foY1kTVBI6E z0eA== X-Gm-Message-State: AFqh2krQuwHrxHUOW6AfsP8i/dKgMBAjqxpaGuMf6Y/qsMkG6mMxIZLe ytxuJjRBGmxsBv1KcTfBmOdKyFgCHt/S+3ImofU= X-Google-Smtp-Source: AMrXdXs4E9l8NjQIMp14iKiTOOeIrfD+5LXjzJ4YD8OOdF+TPNZjj4HUCIdyUql0pN6CX/G9TqCUi3zsMySeLhjkx6U= X-Received: by 2002:a9d:7997:0:b0:685:130:a123 with SMTP id h23-20020a9d7997000000b006850130a123mr655560otm.335.1674133156984; Thu, 19 Jan 2023 04:59:16 -0800 (PST) MIME-Version: 1.0 References: <20230112.120338.534662300633460797.horikyota.ntt@gmail.com> In-Reply-To: From: Amit Kapila Date: Thu, 19 Jan 2023 18:29:05 +0530 Message-ID: Subject: Re: Time delayed LR (WAS Re: logical replication restrictions) To: vignesh C Cc: "Takamichi Osumi (Fujitsu)" , Peter Smith , Kyotaro Horiguchi , "Hayato Kuroda (Fujitsu)" , "shveta.malik@gmail.com" , "dilipbalaut@gmail.com" , "euler@eulerto.com" , "m.melihmutlu@gmail.com" , "andres@anarazel.de" , "marcos@f10.com.br" , "pgsql-hackers@postgresql.org" Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Jan 19, 2023 at 4:25 PM vignesh C wrote: > > On Thu, 19 Jan 2023 at 12:06, Takamichi Osumi (Fujitsu) > wrote: > > > > Updated the comment and the function call. > > > > Kindly have a look at the updated patch v17. > > Thanks for the updated patch, few comments: > 1) min_apply_delay was accepting values like '600 m s h', I was not > sure if we should allow this: > alter subscription sub1 set (min_apply_delay = ' 600 m s h'); > I think here we should have specs similar to recovery_min_apply_delay. > > 2) How about adding current_txn_wait_time in > pg_stat_subscription_stats, we can update the current_txn_wait_time > periodically, this will help the user to check approximately how much > time is left(min_apply_delay - stat value) before this transaction > will be applied in the subscription. If you agree this can be 0002 > patch. > Do we have any similar stats for recovery_min_apply_delay? If not, I suggest let's postpone this to see if users really need such a parameter. -- With Regards, Amit Kapila.