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 1w9tzO-001sEX-2V for pgpool-hackers@arkaria.postgresql.org; Tue, 07 Apr 2026 00:08:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w9tzN-00CuK7-1B for pgpool-hackers@arkaria.postgresql.org; Tue, 07 Apr 2026 00:08:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w9tzM-00CuK0-2y for pgpool-hackers@lists.postgresql.org; Tue, 07 Apr 2026 00:08:17 +0000 Received: from meldrar.postgresql.org ([2a02:c0:301:0:ffff::31]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w9tzK-00000000zdH-0Dg3 for pgpool-hackers@lists.postgresql.org; Tue, 07 Apr 2026 00:08:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Content-Transfer-Encoding:Content-Type: Mime-Version:References:In-Reply-To:From:Subject:Cc:To:Message-Id:Date:Sender :Reply-To:Content-ID:Content-Description; bh=v4ZoIskImxNfcx+B+HFs5+3lJwbLMwmCjdcs8GQiICw=; b=Avvf5nbcoA5TrVA4gIxcqhtxWm JpN2T3m2bC4PbAad83QuF79kBpsqh5GqsaN5ui4gyTxHRKFGM2pzKqFwISIDBDVmXt2R9+U0rRVf7 SaCwOAZegw9nUEr/r5UDwDBDLSPdXG+P29XLcXWFYKysnM6CUI3iNBmOB/Oh7jxPz/PSSJ0cT64R7 2ONmt5TFIKBG7ujQEz6utgSwBsK/v/keurU5znSeGiuUM711IdxNwTRPbYyP1XOHGHW+19xzV1SSX z4sA/BgGfuuEeds/6A8rWi4YIRT8x6+aoc3D0b1H1fNrk0eCyzBHXs6FDiCjVlYPXX5du4Z+X/epi b5a0TGYQ==; Received: from [2409:11:4120:300:7b2:58f5:d591:99e6] (helo=localhost) by meldrar.postgresql.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w9tzH-002EpK-2W; Tue, 07 Apr 2026 00:08:14 +0000 Date: Tue, 07 Apr 2026 09:08:02 +0900 (JST) Message-Id: <20260407.090802.1335576118037412011.ishii@postgresql.org> To: nadav@tailorbrands.com Cc: pgpool-hackers@lists.postgresql.org Subject: Re: Proposal: Recent mutated table tracking in memory From: Tatsuo Ishii In-Reply-To: References: <20260323.141315.1197840295971477812.ishii@postgresql.org> X-Mailer: Mew version 6.8 on Emacs 29.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2409:11:4120:300:7b2:58f5:d591:99e6 (failed) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Nadav, > Hi Tatsuo, > > Thank you for the thorough review and the fix to the tests!. Here's the > updated patch addressing all your comments. > > re - replication_delay_source_cmd requirement > > Good catch ― the feature now also works when `delay_threshold_by_time > 0`. > I've added the TTL update call to `check_replication_time_lag()` (the > pg_stat_replication path), not just > `check_replication_time_lag_with_cmd()`. The docs are updated to reflect > that either `replication_delay_source_cmd` or `delay_threshold_by_time` can > provide the time-based delay. > > re - Documentation compile error > > Fixed ― the xref was pointing to `runtime-config-track-table-mutation` but > the actual section ID is `runtime-config-table-mutation-map`. > > Thanks again and looking forward to hearing back from you. While looking into your patch, I noticed that following part would be better to be committed as a separate patch as it's actually a bug fix, not related to the feature: query cache is not invalidated if MERGE statement is executed. I will take care of it and get back to you. --- a/src/query_cache/pool_memqcache.c +++ b/src/query_cache/pool_memqcache.c @@ -1305,6 +1305,12 @@ pool_extract_table_oids(Node *node, int **oidsp) } return num_oids; } + else if (IsA(node, MergeStmt)) + { + MergeStmt *stmt = (MergeStmt *) node; + + table = make_table_name_from_rangevar(stmt->relation); + } else if (IsA(node, ExplainStmt)) { ListCell *cell; Thanks for letting me know about the bug! Regards, -- Tatsuo Ishii SRA OSS K.K. English: http://www.sraoss.co.jp/index_en/ Japanese:http://www.sraoss.co.jp