<div dir="ltr">Thanks for your support. <br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 13, 2020 at 11:02 AM Bo Peng <<a href="mailto:pengbo@sraoss.co.jp">pengbo@sraoss.co.jp</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
On Wed, 12 Feb 2020 14:30:25 +0530<br>
postgann2020 s <<a href="mailto:postgann2020@gmail.com" target="_blank">postgann2020@gmail.com</a>> wrote:<br>
<br>
> Hi Bo,<br>
> Thanks for update.<br>
> We are using pg_terminate_backend(pid),but we observed failover was<br>
> happened at pgpool level.<br>
> Please suggest the process to terminate the processes.<br>
> Regards,<br>
> Postgann.<br>
<br>
Is your purpose to close backend connection from pgpool?<br>
>From pgpool 3.6, you can use "pg_terminate_backend(pid)" to close backend connection from pgpool.<br>
<br>
Example:<br>
<br>
# ps aux | grep pgpool<br>
...<br>
pengbo    4015  0.0  0.0 161016  2304 pts/3    S    14:29   0:00 pgpool: pengbo test ::1(46748) idle<br>
<br>
# ps aux | grep postgres<br>
...<br>
pengbo    4045  0.0  0.0 273400  3000 ?        Ss   14:30   0:00 postgres: pengbo test [local] idle<br>
pengbo    4046  0.0  0.0 273352  2940 ?        Ss   14:30   0:00 postgres: pengbo test [local] idle<br>
<br>
To close backend connection pid:4045, you can execute:<br>
<br>
test=# select pg_terminate_backend(4045);<br>
<br>
<br>
> On Wed, Feb 12, 2020, 11:00 AM Bo Peng <<a href="mailto:pengbo@sraoss.co.jp" target="_blank">pengbo@sraoss.co.jp</a>> wrote:<br>
> <br>
> > Hi,<br>
> ><br>
> > On Wed, 12 Feb 2020 10:37:00 +0900<br>
> > Bo Peng <<a href="mailto:pengbo@sraoss.co.jp" target="_blank">pengbo@sraoss.co.jp</a>> wrote:<br>
> ><br>
> > > On Mon, 10 Feb 2020 23:06:51 +0530<br>
> > > postgann2020 s <<a href="mailto:postgann2020@gmail.com" target="_blank">postgann2020@gmail.com</a>> wrote:<br>
> > ><br>
> > > > Hi Team,<br>
> > > ><br>
> > > > We have 1 master and 2 slaves with pgpool configuration  running in<br>
> > > > streaming replication mode.<br>
> > > ><br>
> > > > Sometimes we are getting situation of terminating postgres and pgpool<br>
> > > > process from the db and terminate  , but while using<br>
> > pg_terminate_backend<br>
> > > > from progress which causing falover at pgpool level.and not sure how to<br>
> > > > close pgpool child process as well.<br>
> > > ><br>
> > > > Could you please suggest the recommended process to terminate postgres<br>
> > and<br>
> > > > pgpool process..<br>
> ><br>
> ><br>
> > Pgpool supports "select pg_terminate_backend(PID)".<br>
> ><br>
> > > > 1. How to terminate postgres process from database and terminate?.<br>
> > > > 2. How to terminate pgpool child process from pool and terminal?<br>
> > ><br>
> > > You need to terminate pgpool first before terminate postgres.<br>
> > > And also you need to start postgres before start pgpool.<br>
> > ><br>
> > > --<br>
> > > Bo Peng <<a href="mailto:pengbo@sraoss.co.jp" target="_blank">pengbo@sraoss.co.jp</a>><br>
> > > SRA OSS, Inc. Japan<br>
> > > _______________________________________________<br>
> > > pgpool-general mailing list<br>
> > > <a href="mailto:pgpool-general@pgpool.net" target="_blank">pgpool-general@pgpool.net</a><br>
> > > <a href="http://www.pgpool.net/mailman/listinfo/pgpool-general" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-general</a><br>
> ><br>
> ><br>
> > --<br>
> > Bo Peng <<a href="mailto:pengbo@sraoss.co.jp" target="_blank">pengbo@sraoss.co.jp</a>><br>
> > SRA OSS, Inc. Japan<br>
> ><br>
<br>
<br>
-- <br>
Bo Peng <<a href="mailto:pengbo@sraoss.co.jp" target="_blank">pengbo@sraoss.co.jp</a>><br>
SRA OSS, Inc. Japan<br>
</blockquote></div>