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 1pInSg-0003vH-9s for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Jan 2023 09:13:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pInSe-0001Ay-Ds for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Jan 2023 09:13: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 1pInSe-0001Ap-34 for pgsql-hackers@lists.postgresql.org; Fri, 20 Jan 2023 09:13:24 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pInSb-0005HI-R9 for pgsql-hackers@postgresql.org; Fri, 20 Jan 2023 09:13:23 +0000 Received: by mail-wm1-x329.google.com with SMTP id m15so3479536wms.4 for ; Fri, 20 Jan 2023 01:13:21 -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=7lt+uT4a0YXXN0+NnFt8bI2OHoHEJNAlK7Ds2VeuJYs=; b=cf+CJCuydm0s1nUvovJDDpQ7YJmG6t4P1ML6b4dbvUlkWGRJZhSz/Bl8CPStoqY495 H6Rt74SAXDX6Bm8Jv+3G66qVRsQBV0Lqea3093OUtDxDssn+i/hc+Qwk/99MiDG4q+ZO ZJDNrzbyvcvvcKXs2gjR4zghLQQLiEqzgR//qqIIhkFZeE3TRcl/lQ/YHs7uklBEpF/N mGoeIRhAXQUaOE/Npt5bQSDzBj1l/pF4johNuXlLfplnGQOAcSEQ42MejAWXet4jsPUx WSeLqrp2eEw1ZAswongG3QDoPo0XvHwGGSRriXajz9uTbtDZ7VMQtJ3w16HcmiaNG/9A 4pQA== 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=7lt+uT4a0YXXN0+NnFt8bI2OHoHEJNAlK7Ds2VeuJYs=; b=C4eU6a+nyAfWXh/w4Ufl1Q060Cs4gyWVP9pfdCdiDlA2CYnksv6DUhFM91bE+705Te qVroq7dQ/Ku7l117E+OQ0w2RdowI+Y3OhZZ/qskHEodZWrg7+oeOPfDWD40ZovnUSqOK KAbNMYrrDpoEbsWCg8o2BrA/ulYaQ3/UJLJsEMZlPrZtwM2L5moM+N6p/KzBkjfVeJcg W4drwnRv/OXvu/qFyyHoS9DFxGe7MIarlGxl95tNjvITv7D81e/u9n3Ab2rIcSj8FhPv wSm0CqX5uuFgHZw5inD5cnvpUuKjVMFCNJE5u8EI+QJ2RROTyUjaulDUkAw80IGoq7jc FWdQ== X-Gm-Message-State: AFqh2krBwPdqF/U1RaheyAKU+mPVEoGZN/1d4bOqONUnihZfzt2fmIc7 qrR6SKVwU0yXxGULZXvWQ25kK1bn4PTdZbmEOuQ= X-Google-Smtp-Source: AMrXdXujwMSVuagUjVNIs8pQlkFyj8U1DPk5ATEJ+LfgotNQOW/RXoz8cK4VNHY26SyYbu3F0nkHFwpjU/qyC8gy5XA= X-Received: by 2002:a05:600c:3d05:b0:3d9:fae2:344b with SMTP id bh5-20020a05600c3d0500b003d9fae2344bmr767875wmb.105.1674206000211; Fri, 20 Jan 2023 01:13:20 -0800 (PST) MIME-Version: 1.0 References: <20230112.120338.534662300633460797.horikyota.ntt@gmail.com> In-Reply-To: From: shveta malik Date: Fri, 20 Jan 2023 14:43:08 +0530 Message-ID: Subject: Re: Time delayed LR (WAS Re: logical replication restrictions) To: Peter Smith Cc: "Takamichi Osumi (Fujitsu)" , vignesh C , Kyotaro Horiguchi , "Hayato Kuroda (Fujitsu)" , "dilipbalaut@gmail.com" , "amit.kapila16@gmail.com" , "euler@eulerto.com" , "m.melihmutlu@gmail.com" , "andres@anarazel.de" , "marcos@f10.com.br" , "pgsql-hackers@postgresql.org" , shveta malik Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Jan 20, 2023 at 2:23 PM shveta malik wrote: > > On Fri, Jan 20, 2023 at 1:08 PM Peter Smith wrote: > > > a) the message should say that this is the *remaining* time to left to wait. > > > > b) it might be convenient to know from the log what was the original > > min_apply_delay value in the 1st place. > > > > For example, the logs might look something like this: > > > > DEBUG: time-delayed replication for txid 1234, min_apply_delay = > > 160000 ms. Remaining wait time: 159972 ms > > DEBUG: time-delayed replication for txid 1234, min_apply_delay = > > 160000 ms. Remaining wait time: 142828 ms > > DEBUG: time-delayed replication for txid 1234, min_apply_delay = > > 160000 ms. Remaining wait time: 129994 ms > > DEBUG: time-delayed replication for txid 1234, min_apply_delay = > > 160000 ms. Remaining wait time: 110001 ms > > ... > > > > +1 > This will also help when min_apply_delay is set to a new value in > between the current wait. Lets say, I started with min_apply_delay=5 > min, when the worker was half way through this, I changed > min_apply_delay to 3 min or say 10min, I see the impact of that change > i.e. new wait-time is adjusted, but log becomes confusing. So, please > keep this scenario as well in mind while improving logging. > when we send-feedback during apply-delay after every wal_receiver_status_interval , the log comes as: 023-01-19 17:12:56.000 IST [404795] DEBUG: sending feedback (force 1) to recv 0/1570840, write 0/1570840, flush 0/1570840 Shall we have some info here to indicate that it is sent while waiting for apply_delay to distinguish it from other such send-feedback logs? It will make apply_delay flow clear in logs. thanks Shveta