pg.ddx.io  pgpool-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tatsuo Ishii <ishii@postgresql.org>
To: nadav@tailorbrands.com
Cc: pgpool-hackers@lists.postgresql.org
Subject: Re: Proposal: Recent mutated table tracking in memory
Date: Tue, 07 Apr 2026 09:08:02 +0900 (JST)
Message-ID: <20260407.090802.1335576118037412011.ishii@postgresql.org> (raw)
In-Reply-To: <CACeKOO2fMX9f9hFVHCYEF9BUWV0xD21K2JPQFYzZSWVdC6ZrXQ@mail.gmail.com>
References: <CACeKOO0ifCtNP6b=h-24EWnw_NJy-KhOc9mWOLZKAxkF_iEogw@mail.gmail.com>
	<20260323.141315.1197840295971477812.ishii@postgresql.org>
	<CACeKOO2fMX9f9hFVHCYEF9BUWV0xD21K2JPQFYzZSWVdC6ZrXQ@mail.gmail.com>

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





view thread (61+ messages)  latest in thread

Message-ID: <20260407.090802.1335576118037412011.ishii@postgresql.org>
Permalink:  ../20260407.090802.1335576118037412011.ishii@postgresql.org/
Also on:    postgresql.org/message-id/20260407.090802.1335576118037412011.ishii@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgpool-hackers@postgresql.org
  Cc: ishii@postgresql.org, nadav@tailorbrands.com, pgpool-hackers@lists.postgresql.org
  Subject: Re: Proposal: Recent mutated table tracking in memory
  In-Reply-To: <20260407.090802.1335576118037412011.ishii@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox