[pgpool-general: 2793] Re: redhat pgpool.init script

Yugo Nagata nagata at sraoss.co.jp
Wed Apr 23 19:43:26 JST 2014


Hi Alexandru,

I wrote a new pgpool.init. Could you please try this?

In previous, pgpool.init uses killproc for stopping pgpool, but there are
several problems; (1) some child processes can be left since the parent
process restarts killed processes; (2) when pgpool has connection from
clients, pgpool can't stop until connection closed; (3) restart() fails
for these reasons.

In the new version, "pgpool -m fast stop" is used in stop(). The problems
above are resolved and restart() also works well, even when watchdog enabled. 
In addition, exit code according with LSB is considered and try-restart
option is implemented.
http://refspecs.linuxbase.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptact.html


On Mon, 17 Mar 2014 15:37:09 -0700
Alexandru Cardaniuc <cardaniuc at gmail.com> wrote:

> Hi Devrim,
> 
> I just checked the sources from the link you provided for the pgpool.init:
> http://svn.pgrpms.org/repo/rpm/redhat/9.3/pgpool-II/EL-6/pgpool.init
> 
> And it's still version 2.3 over there. That doesn't account for the
> problems described here:
> http://www.sraoss.jp/pipermail/pgpool-hackers/2012-May/000068.html
> and here:
> http://lists.pgfoundry.org/pipermail/pgpool-hackers/2010-November/000407.html
> 
> The problem seems to be also described in this bug ticket:
> http://www.pgpool.net/mantisbt/view.php?id=12
> 
> I can consistently reproduce it. How to reproduce it:
> * configure pgpool-II to use watchdog with two nodes
> say delegate_IP is on the primary node
> * then service pgpool stop on the primary node will bring down the
> delegate_IP interface and that would go to the secondary node, but it would
> not remove the /var/run/pgpool_status and both socket files (for pcp 9898
> and pgpool 9999). Hence when you try to start it later it will fail with
> cannot bind to socket error.
> That also makes 'service pgpool restart' fail on the node that has the
> delegate_IP assigned at the moment.
> 
> It works fine on the node that doesn't have delegate_IP assigned and also
> works fine on the primary node with delegate_IP BUT only when the secondary
> node is already down.
> 
> Looks like it can be traced to how the 'pgpool stop' calls killproc and
> only when watchdog with delegate_IP is configured (with ifconfig to bring
> the interface up/down).
> 
> 
> 
> 
> 
> On Sun, Mar 16, 2014 at 4:53 PM, Devrim GÜNDÜZ <devrim at gunduz.org> wrote:
> 
> >
> > Hi,
> >
> > Now we have the community RPM repository, RPMS are there:
> >
> >
> > http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/repoview/pgpool-II-93.html
> >
> > This also includes the fixes there. Still, if you want to use the
> > sources, and not the RPMs, then:
> >
> > http://svn.pgrpms.org/repo/rpm/redhat/9.3/pgpool-II/EL-6/
> >
> > is the URL for the spec file and other patches we have.
> >
> > Regards, Devrim
> >
> > On Sat, 2014-03-15 at 22:23 -0700, Alexandru Cardaniuc wrote:
> > >
> > >
> > > Was reading 2012 mailing list and saw a thread about issues with
> > > redhat
> > > pgpool.init script. But it doesn't look like any changes have been
> > > made to
> > > the checked-in pgpool.init script. The last version is still the one
> > > from 4
> > > years ago?:
> > > # v2.2.5 Devrim GUNDUZ <devrim at CommandPrompt.com>
> > > # - Fix logging.
> > >
> > > And that's the one checked-in the latest version of pgpool sources. I
> > > get
> > > it when I build using pgpool-II-3.3.2.tar.gz
> > >
> > > Is there a newer version of the pgpool.init script that is for some
> > > reason
> > > not included in the latest sources tarball?
> >
> >
> > --
> > Devrim GÜNDÜZ
> > Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
> > PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
> > Twitter: @DevrimGunduz , @DevrimGunduzTR
> >
> >
> >
> 
> 
> -- 
> Sincerely yours,
> Alexandru Cardaniuc


-- 
Yugo Nagata <nagata at sraoss.co.jp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgpool.init.patch
Type: text/x-diff
Size: 4681 bytes
Desc: not available
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20140423/50c1e377/attachment.bin>


More information about the pgpool-general mailing list