need a shim between postgresql and pgpool startup
Jason Helfman
jgh at FreeBSD.org
Sun Mar 11 07:02:40 UTC 2012
On Wed, Mar 7, 2012 at 1:49 PM, Randal L. Schwartz <merlyn at stonehenge.com>wrote:
> >>>>> "Matthew" == Matthew Seaman <matthew at 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
More information about the freebsd-rc
mailing list