Date: Sat, 10 Mar 2012 23:02:39 -0800 From: Jason Helfman <jgh@FreeBSD.org> To: "Randal L. Schwartz" <merlyn@stonehenge.com> Cc: rc@freebsd.org, Matthew Seaman <matthew@freebsd.org> Subject: Re: need a shim between postgresql and pgpool startup Message-ID: <CAMuy=%2BiSCjS5ogPhV5NRu0v2Vw6Wh1JwTJhXvvZ%2B9dR4ZBdjtA@mail.gmail.com> In-Reply-To: <86aa3sdqu9.fsf@red.stonehenge.com> References: <86r4x4dv1r.fsf@red.stonehenge.com> <4F57D10D.1030501@FreeBSD.org> <86aa3sdqu9.fsf@red.stonehenge.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Mar 7, 2012 at 1:49 PM, Randal L. Schwartz <merlyn@stonehenge.com>wrote: > >>>>> "Matthew" == Matthew Seaman <matthew@FreeBSD.org> writes: > > Matthew> For extra credit, write a small routine that attempts to log into > Matthew> postgres (or otherwise establish that postgres is up and doing) > and > Matthew> loops until it succeeds or it has reached a certain maximum > number of > Matthew> tries. Make this a function called start_precommand() and use the > Matthew> run_rc_command facility so it only runs if the script is given > some form > Matthew> of start argument. Docco on rc script functionality is in > rc.subr(8) > > Matthew> Also look at: > Matthew> > http://www.freebsd.org/doc/en/books/porters-handbook/rc-scripts.html > > Yeah, I'd been staring at those for a few hours, even staring at the > source code of rc.subr to sort this out. Thanks for the drop-in > answer. I'll see if it does the job on the next reboot. > > This is starting to appear more and more like a bug in pgpool rc script. When are you going to run pgpool without a pgsql server? Why not have a dependeny on pgsq on pgpooll, and require it in rc? Am I off-base, or would there be instances where you would run pgpool outside of an environment running pgsql-server? thanks -jgh
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMuy=%2BiSCjS5ogPhV5NRu0v2Vw6Wh1JwTJhXvvZ%2B9dR4ZBdjtA>