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 1vzT18-0011v3-2d for pgpool-hackers@arkaria.postgresql.org; Mon, 09 Mar 2026 05:18:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vzT16-00Dtuu-17 for pgpool-hackers@arkaria.postgresql.org; Mon, 09 Mar 2026 05:18:56 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vzT16-00Dtun-0U for pgpool-hackers@lists.postgresql.org; Mon, 09 Mar 2026 05:18:56 +0000 Received: from meldrar.postgresql.org ([2a02:c0:301:0:ffff::31]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vzT13-00000001EZq-2SE3 for pgpool-hackers@lists.postgresql.org; Mon, 09 Mar 2026 05:18:55 +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=iLhSAb3+qcjpdVcCbGQiFttQrJyPXWd+t7BPQHbe9hM=; b=7U/09r88AFZODgtsymZ6QIwLdN OGg+swmnluU4H05qkyilgcJKn4YeADQNtmhbqupNy58wUpVj/Aih8liWuf6NAu4p7dUsj4/ZjNoFd o1B23w0+LtR1E8x41u2lMlBcKCDfZ7KuPXqrjMfZ7Mg+y+aVEs373LGaZYwxL4Jdv7mrUlrjSR7Qz w86ED4PWt27C016YDOvi/CyCLmsiwKbG3pw8/92xZtFkh7ps/mkuz/eKpFzKiJwJiCGP0LkngowJE xgkDNlWOuXoNQpLtVtpYY2w9YwefwG9qmgIhi6SBe0tDFmgtU+dP6L/6RYmey4pNpnFcAmA9oKLVo HmQF9wpQ==; Received: from [2409:11:4120:300:3b06:b85d:4a94:852a] (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 1vzT0y-00B65D-2Q; Mon, 09 Mar 2026 05:18:51 +0000 Date: Mon, 09 Mar 2026 14:18:39 +0900 (JST) Message-Id: <20260309.141839.397327759559519126.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: <20260226.164742.1123136102374463742.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:3b06:b85d:4a94:852a (failed) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Nadav, Sorry for late response. I have been working on this issue. > > Added some handling for possible causes - works now. > > Unfortunately this doesn't work here. Still 042 test fails if it is > executed *after* 041. i.e. > > ./regress.sh 04[12] <-- 042 fails > ./regress.sh 042 <-- Ok I ran following script to see if some sockets are left after the 041 test. ./regress.sh '041';netstat -ap|grep 11000;./regress.sh 042 : testing 041.external_replication_delay...ok. out of 1 ok:1 failed:0 timeout:0 (一部のプロセスが識別されますが, 所有していないプロセスの情報は 表示されません。それら全てを見るにはルートになる必要があります.) tcp 0 0 0.0.0.0:11000 0.0.0.0:* LISTEN 1401942/bash tcp 0 0 localhost:36366 localhost:11000 TIME_WAIT - tcp 0 0 localhost:36380 localhost:11000 TIME_WAIT - tcp 0 0 localhost:36384 localhost:11000 TIME_WAIT - tcp 0 0 localhost:36390 localhost:11000 TIME_WAIT - tcp 0 0 localhost:43580 localhost:11000 TIME_WAIT - tcp 0 0 localhost:43596 localhost:11000 TIME_WAIT - tcp6 0 0 [::]:11000 [::]:* LISTEN 1401942/bash unix 2 [ ACC ] STREAM LISTENING 10164557 1401942/bash /tmp/.s.PGSQL.11000 creating pgpool-II temporary installation ... moving pgpool_setup to temporary installation path ... moving watchdog_setup to temporary installation path ... using pgpool-II at /home/t-ishii/work/Pgpool-II/current/pgpool2/src/test/regression/temp/installed ************************* REGRESSION MODE : install Pgpool-II version : pgpool-II version 4.8devel (mitsukakeboshi) Pgpool-II install path : /home/t-ishii/work/Pgpool-II/current/pgpool2/src/test/regression/temp/installed PostgreSQL bin : /usr/local/pgsql/bin PostgreSQL Major version : 18 pgbench : /usr/local/pgsql/bin/pgbench PostgreSQL jdbc : /usr/local/pgsql/share/postgresql-9.2-1003.jdbc4.jar ************************* testing 042.track_table_mutation...failed. out of 1 ok:0 failed:1 timeout:0 It seems the cause of the issue is the bash process: unix 2 [ ACC ] STREAM LISTENING 10164557 1401942/bash /tmp/.s.PGSQL.11000 It keeps on listening to the socket even after the test and it prevents pgpool in 042 test from binding the socket, which causes the test failure. Possible solutions are: 1) fix the external replication delay checking to close the listening socket before starting bash. 2) close the listening socket when the streaming replication check worker process forks. While invensting the issue, I found similar problem is in other places. For example, pcp process inherits pgpool listening sockets which are not necessary for pcp. I posted a proposal to fix the issue: https://www.postgresql.org/message-id/20260302.100028.1346768433787074248.ishii%40postgresql.org This includes the fix #2. I plan to commit the patch today. After our buildfarm reports no new problem (it will take 2- 3 days), I am going to test your patch again. Best regards, -- Tatsuo Ishii SRA OSS K.K. English: http://www.sraoss.co.jp/index_en/ Japanese:http://www.sraoss.co.jp