[pgpool-general: 4624] Re: /var/run/pgpool is deleted after rebooting the machine

Yugo Nagata nagata at sraoss.co.jp
Thu Apr 7 15:33:11 JST 2016


Hi Giles,

Hmm... pgpool.init is basically for RHEL. At first, I thought that you might
be able to use this in Ubuntu, but this includes /etc/rc.d/init.d/functions
which doesn't exist on Ubuntu, so you cannot use this.

Accually, you should use /etc/init.d/pgpool2 provided by Ubuntu repository
since pgpool-II developers don't provide this. Alhough you will be able to
get this by `apt-get install pgpool2`, I attached the same file. 

If you want to use /var/run/pgpool as the pid directory, rewrite PIDFILE
and replace "/var/run/postgresql" to "/var/run/pgpool" in d_start()


On Wed, 6 Apr 2016 18:27:30 +0600
Giles Cornelius <gil.corn at gmail.com> wrote:

> Hi Yugo,
> 
> I can see that lot of paths are lot of paths in pgpool.init which are not
> matching with ubuntu. Can you please tell me what are the changes I need to
> make in that file.
> 
> Regards,
> Giles.
> 
> On Wed, Apr 6, 2016 at 7:23 AM, Yugo Nagata <nagata at sraoss.co.jp> wrote:
> 
> > Hi Giles,
> >
> > On Tue, 5 Apr 2016 16:43:50 +0600
> > Giles Cornelius <gil.corn at gmail.com> wrote:
> >
> > > Hi Yugo,
> > >
> > > I have found  pgpool.init at /pgpool-II-3.4.3/src/redhat but 'dpkg -L
> > > pgpool' result says
> > >
> > > dpkg-query: package 'pgpool' is not installed
> > > Use dpkg --info (= dpkg-deb --info) to examine archive files,
> > > and dpkg --contents (= dpkg-deb --contents) to list their contents.
> >
> > I'm sorry, it's my mistake. The package name is 'pgpool2' not 'pgpool'...
> >
> > >
> > > But I have installed pgpool according to following doc and it is working
> > > fine.
> > >
> > > http://www.pgpool.net/pgpool-web/contrib_docs/simple_sr_setting2_3.3/
> > >
> > > What should I do now?
> >
> > Just copy pgpool.init included in the tar ball as /etc/init.d/pgpool. This
> > will
> > make /var/run/pgpool directory if doesn't exist when pgpool-II is started
> > by the
> > script.
> >
> > However, note that this is basically made for RHEL not Ubuntu. For example,
> > this looks for configuration file in the /etc/sysconfig not /etc/default.
> > Maybe, some modification migth be needed.
> >
> >
> > >
> > > Regards,
> > > Giles.
> > >
> > >
> > >
> > >
> > > On Tue, Apr 5, 2016 at 1:21 PM, Yugo Nagata <nagata at sraoss.co.jp> wrote:
> > >
> > > > Hi Giles,
> > > >
> > > > If you build pgpool-II from the tar ball, src/redhat/pgpool.init is
> > this.
> > > > Otherwize, if you installed by apt-get or deb packages, unfortunately I
> > > > don't
> > > > know where is. However, in my ubuntu, `dpkg -L pgpool` reuslt says
> > > > /etc/init.d/pgpoo2 exists.
> > > >
> > > > Regards,
> > > > Yugo.
> > > >
> > > > On Tue, 5 Apr 2016 12:18:23 +0600
> > > > Giles Cornelius <gil.corn at gmail.com> wrote:
> > > >
> > > > > Dear Nagata,
> > > > >
> > > > > Thank you for your response. Where is the init script of pgpool?
> > There is
> > > > > no file at /etc/init.d/ named pgpool or pgpool2.
> > > > >
> > > > > Regards,
> > > > > Giles.
> > > > >
> > > > > On Tue, Apr 5, 2016 at 8:04 AM, Yugo Nagata <nagata at sraoss.co.jp>
> > wrote:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > On Mon, 4 Apr 2016 17:54:42 +0600
> > > > > > Giles Cornelius <gil.corn at gmail.com> wrote:
> > > > > >
> > > > > > > Dear Friends,
> > > > > > >
> > > > > > > When I reboot pgpool server /var/run/pgpool is deleted. Every
> > time I
> > > > > > reboot
> > > > > > > the server the I need to create pgpool and change owner and
> > > > permission. I
> > > > > > > am using pgpool 3.4 on Ubuntu.
> > > > > > >
> > > > > > > What is the solution of this problem?
> > > > > >
> > > > > > I think this is a problem of Ubuntu not pgpool. I guess /var/run
> > > > > > is mounted to tmpfs, so the contents of the directory is deleted on
> > > > > > reboot. If so, the directory for pid should be made in the init
> > > > > > script such as:
> > > > > >
> > > > > > PGPOOLUSER=postgres
> > > > > > ...
> > > > > > PGPOOLPIDDIR=/var/run/pgpool
> > > > > > ...
> > > > > >
> > > > > > if [ ! -d $PGPOOLPIDDIR ]
> > > > > > then
> > > > > >     mkdir $PGPOOLPIDDIR
> > > > > >     chown ${PGPOOLUSER}: $PGPOOLPIDDIR
> > > > > > fi
> > > > > >
> > > > > >
> > > > > > >
> > > > > > > Regards,
> > > > > > > Giles.
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Yugo Nagata <nagata at sraoss.co.jp>
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > >
> > > > > *
> > > > >
> > > > > Every 3000 sheets of paper cost us a tree. Think about hazards
> > related to
> > > > > climate change before printing this e-mail.*
> > > >
> > > >
> > > > --
> > > > Yugo Nagata <nagata at sraoss.co.jp>
> > > >
> > >
> > >
> > >
> > > --
> > >
> > > *
> > >
> > > Every 3000 sheets of paper cost us a tree. Think about hazards related to
> > > climate change before printing this e-mail.*
> >
> >
> > --
> > Yugo Nagata <nagata at sraoss.co.jp>
> >
> 
> 
> 
> -- 
> 
> *
> 
> Every 3000 sheets of paper cost us a tree. Think about hazards related to
> climate change before printing this e-mail.*


-- 
Yugo Nagata <nagata at sraoss.co.jp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgpool2
Type: application/octet-stream
Size: 1891 bytes
Desc: not available
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20160407/afbde673/attachment.obj>


More information about the pgpool-general mailing list