Date: Thu, 22 Dec 2005 01:38:20 -0800 From: Doug Barton <dougb@FreeBSD.org> To: Cristiano Deana <cristiano.deana@gmail.com> Cc: freebsd-ports@freebsd.org Subject: Re: Bug[?] In new local_startup and postgresql Message-ID: <43AA740C.7050903@FreeBSD.org> In-Reply-To: <d8a4930a0512211702m56bf7700h@mail.gmail.com> References: <d8a4930a0512211550u76655f3by@mail.gmail.com> <20051222022727.086a6a3c@it.buh.tecnik93.com> <43A9F6B3.9020302@FreeBSD.org> <d8a4930a0512211702m56bf7700h@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------030103010607080206040009 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cristiano Deana wrote: > 2005/12/22, Doug Barton <dougb@freebsd.org>: > >> The only thing odd I see there is that 010.pgsql.sh is run after >> 000.pkgtools.sh. I think the latter is for portupgrade, yes? If so, that >> shouldn't make any difference, right? > > THIS is the problem (sorry, i had no /var/log/console.log): > Dec 22 01:57:56 db kernel: pg_ctl: invalid operation mode: faststart Aha! That's an easy one! :) When booting normally from /etc/rc, the scripts are passed the argument faststart, not just start. Internally the "fast" is stripped within the run_rc_command function, but that doesn't help the script that (bogusly) assumes that the argument will be simply "start" or "stop." The attached patch fixes this problem for me, although I don't have a real postgres installed, I just quickly installed the port so that I could test this. Please let us know if this works for you. Doug -- This .signature sanitized for your protection --------------030103010607080206040009 Content-Type: text/plain; name="pgsql.sh.tmp1.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="pgsql.sh.tmp1.diff" Index: pgsql.sh.tmpl =================================================================== RCS file: /home/pcvs/ports/databases/postgresql73-server/files/pgsql.sh.tmpl,v retrieving revision 1.16 diff -u -r1.16 pgsql.sh.tmpl --- pgsql.sh.tmpl 19 Mar 2005 03:51:44 -0000 1.16 +++ pgsql.sh.tmpl 22 Dec 2005 09:36:59 -0000 @@ -35,9 +35,14 @@ name=postgresql rcvar=`set_rcvar` command=${prefix}/bin/pg_ctl -command_args="-D ${postgresql_data} ${postgresql_flags} $1" extra_commands="reload initdb" +case "$1" in +*start) arg1=start ;; +*stop) arg1=stop ;; +esac +command_args="-D ${postgresql_data} ${postgresql_flags} $arg1" + start_cmd="postgresql_command start" stop_cmd="postgresql_command stop" restart_cmd="postgresql_command restart" --------------030103010607080206040009--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43AA740C.7050903>