[Pgpool-general] Re: PGPool suggestion

Tatsuo Ishii ishii at sraoss.co.jp
Wed Nov 9 14:23:57 GMT 2005


> Thanks. Sounds nice idea. I will dig into this more...
> --
> SRA OSS, Inc. Japan
> Tatsuo Ishii
> 
> > Hello, I have a suggestion...
> > If a DROP DATABASE command is issued, it would me nice for pgpool to
> > check for idle connections to that database. If all connections except
> > the connection isssuing the DROP are idle, pgpool should log them out
> > before continuing the DROP DATABASE command.
> > This increases the chance that noone will be logged in and the client is
> > able to drop the database.
> > 
> > I have this problem now when i need to do 'su -c "killall -INT pgpool"'
> > to be able to drop the database...
> > 
> > What do you think?
> > 
> > Regards,
> > Magnus

Ok, I think I found a solution. I have committed following changes
in CVS. Please grab and try it.

It works like this:

1) a pgpool child process finds "DROP DATABASE" command

2) it sends HUP signal to parent pgpool and wait for 5 seconds

3) the parent pgpool sends HUP to all child pgpool

4) each child pgpool receives the signal and releases all idle
   connections to PostgreSQL

5) the child pgpool(1) sends DROP DATABASE command to PostgreSQL

What do you think?
--
SRA OSS, Inc. Japan
Tatsuo Ishii


More information about the Pgpool-general mailing list