[pgpool-hackers: 3847] Use list_delete_cell instead in some places
    Hou, Zhijie 
    houzj.fnst at cn.fujitsu.com
       
    Mon Oct 12 10:55:27 JST 2020
    
    
  
Hi Pgpool hackers
I found some code path use list_delete_ptr while the loop of foreach() is iterating.
List_delete_ptr seems search the list again to find the target cell and delete it.
>	foreach(cell, list)
>	{
>		if (lfirst(cell) == datum)
>			return list_delete_cell(list, cell);
>	}
If we already get the cell in foreach loop, 
I think we can use list_delete_cell to avoid searching the list again.
Please see the attachment for the patch.
Best regards,
houzj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Use-list_delete_cell-instead-in-some-places.patch
Type: application/octet-stream
Size: 1249 bytes
Desc: 0001-Use-list_delete_cell-instead-in-some-places.patch
URL: <http://www.sraoss.jp/pipermail/pgpool-hackers/attachments/20201012/8e8bb6b4/attachment.obj>
    
    
More information about the pgpool-hackers
mailing list