[pgpool-general: 6978] Re: Recommended process to terminate postgres and pgpool processes

postgann2020 s postgann2020 at gmail.com
Wed Apr 15 15:33:35 JST 2020


Hi Bo,

Thanks for your support.

If we want to terminate pgpool child process 4015 from above example?
Can we use select pg_terminate_backend(4015) from pgpool terminal.

Regards,
Postgann.


On Sat, Feb 15, 2020, 8:04 PM postgann2020 s <postgann2020 at gmail.com> wrote:

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


More information about the pgpool-general mailing list