[pgpool-hackers: 4468] Re: abnormal behavior about PGPOOL RESET. and proposal a patch file.

Tatsuo Ishii ishii at sraoss.co.jp
Sat Jun 8 17:25:35 JST 2024


Hello,

> Hello, and nice to meet you guys.
> 
> kashif_zeeshan(kashif.z at bitnine.net) found the abnormal query result with a specific query that is "PGPOOL RESET" query.
> 
> He shared this to me and I also had a same thing.
> 
> especially this bug only occurred when with watchdog is enabled.
> 
> I just do test some with regression test number 4 (watchdog) with fixing this one.
> 
> This is the text result.
> 
> before fixing.
> -----------------
> seo at seo-ThinkPad-E14-Gen-2:~$ psql -p 11000 test
> psql (15.3)
> Type "help" for help.
> 
> test=# PGPOOL RESET client_idle_limit;
> ERROR: Pgpool node id file �0/pgpool_node_id does not exist
> DETAIL: If watchdog is enable, pgpool_node_id file is required
> test=# PGPOOL RESET client_idle_limit;
> SET
> ERROR: Pgpool node id file �y/pgpool_node_id does not exist
> DETAIL: If watchdog is enable, pgpool_node_id file is required
> message type 0x5a arrived from server while idle
> message type 0x43 arrived from server while idle
> message type 0x5a arrived from server while idle
> test=#
> 
> after fixing.
> -----------------
> eo at seo-ThinkPad-E14-Gen-2:~$ psql -p 11000 test
> psql (15.3)
> Type "help" for help.
> 
> test=# PGPOOL RESET client_idle_limit;
> SET
> test=# PGPOOL RESET client_idle_limit;
> SET
> test=# PGPOOL RESET client_idle_limit;
> SET
> test=#
> 
> And also there's some explanation about why I do this and what I want to do in patch file.
> 
> Could you please review this patch?
> 
> If this is not a bug or only occurs for me, this patch should be abandoned. but that's also good for the pgpool because there's nothing matter on it!
> 
> oh well, I read the guideline but this is the first time sending a mail to hackers..
> 
> if I missed something, sorry about that and please tell me.

Thank you for the problem report and the patch. I was able to
reproduce the issue.  Regarding your patch, I think there is no need
to re-calculate the config file path in SetPgpoolNodeId(); it has been
already calculated in ParseConfigFile(). All we need to do is, save
the path in config_file_dir (and change config_file_dir from pointer
to array).

Attached is the patch in this direction.

Best reagards,
--
Tatsuo Ishii
SRA OSS LLC
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgpool_reset_error.diff
Type: text/x-patch
Size: 1697 bytes
Desc: not available
URL: <http://www.pgpool.net/pipermail/pgpool-hackers/attachments/20240608/d368db8f/attachment.bin>


More information about the pgpool-hackers mailing list