[pgpool-general: 9174] Re: How does process_management_mode=dynamic decide which idle connections to drop?

Bo Peng pengbo at sraoss.co.jp
Fri Jul 19 15:29:35 JST 2024


hi,

> > > Postgresql 14.12
> > >
> > > $ pgpool --version
> > > pgpool-II version 4.5.2 (hotooriboshi)
> > >
> > > $ psql -p9999 -c "pgpool show all;" | grep -E
> > > 'process_management|spare_children' | cut -c1-55
> > >  process_management_strategy                | gentle
> > >  process_management_mode                    | dynamic
> > >  min_spare_children                         | 5
> > >  max_spare_children                         | 10
> > >
> > > Attached is a text file showing two queries against pg_stat_activity,
> > about
> > > 20 minutes apart.
> > > The oldest idle connections (pids 1244035 through 1244035 in the text
> > file)
> > > haven't been dropped, even though they've been idle for more than an
> > hour,
> > > and other, younger connections were dropped.
> > >
> > > I'd have expected an LRU algorithm, but apparently not.
> >
> > Do you mean the spare processes kill algorithm to satisfy
> > max_spare_children?
> >
> 
> Correct.

The spare processes kill algorithm selects the processes with minimum number of pooled connections.

-- 
Bo Peng <pengbo at sraoss.co.jp>
SRA OSS LLC
TEL: 03-5979-2701 FAX: 03-5979-2702
URL: https://www.sraoss.co.jp/


More information about the pgpool-general mailing list