Thread: BUG #4122: ./postres 'restart' does not start server with same options as 'start' does

The following bug has been logged online:

Bug reference:      4122
Logged by:          Eugen Konkov
Email address:      Eugen.Konkov@aldec.com
PostgreSQL version: 8.3.1
Operating system:   FreeBSD 6.3
Description:        ./postres 'restart' does not start server with same
options as 'start' does
Details:

sturtup script bug:
http://pgsql.privatepaste.com/2d1s3IvbIp
"Eugen Konkov" <Eugen.Konkov@aldec.com> writes:
> PostgreSQL version: 8.3.1
> Operating system:   FreeBSD 6.3
> Description:        ./postres 'restart' does not start server with same
> options as 'start' does

You'd need to take that up with whoever supplied your startup script.
The one we provide (in contrib/start-scripts/freebsd) clearly does
use the same options for start and restart.

            regards, tom lane
I have just installed Postgres 8.3.1.
And /usr/local/etc/rc.d/postgresql and <tar>/contrib/start-scripts/freebsd
scripts are different
BUG in installator?

----- Original Message -----
From: "Tom Lane" <tgl@sss.pgh.pa.us>
To: "Eugen Konkov" <Eugen.Konkov@aldec.com>
Cc: <pgsql-bugs@postgresql.org>
Sent: Tuesday, April 22, 2008 6:11 PM
Subject: Re: [BUGS] BUG #4122: ./postres 'restart' does not start server
with same options as 'start' does


> "Eugen Konkov" <Eugen.Konkov@aldec.com> writes:
>> PostgreSQL version: 8.3.1
>> Operating system:   FreeBSD 6.3
>> Description:        ./postres 'restart' does not start server with same
>> options as 'start' does
>
> You'd need to take that up with whoever supplied your startup script.
> The one we provide (in contrib/start-scripts/freebsd) clearly does
> use the same options for start and restart.
>
> regards, tom lane
Eugen.Konkov@aldec.com wrote:
> I have just installed Postgres 8.3.1.
> And /usr/local/etc/rc.d/postgresql and
> <tar>/contrib/start-scripts/freebsd scripts are different
> BUG in installator?

the one in /usr/local/etc/rc.d/postgresql is likely the on that freebsd
supplies if you install from the porttree so you should ask them ...


Stefan
Stefan Kaltenbrunner wrote:
> Eugen.Konkov@aldec.com wrote:
>> I have just installed Postgres 8.3.1.
>> And /usr/local/etc/rc.d/postgresql and
>> <tar>/contrib/start-scripts/freebsd scripts are different
>> BUG in installator?
>
> the one in /usr/local/etc/rc.d/postgresql is likely the on that freebsd
> supplies if you install from the porttree so you should ask them ...
>
>
> Stefan
>

Actually this looks like an issue with pg_ctl on freebsd.

If I invoke pg_ctl manually to do a start:

pg_ctl -D /usr/local/pgsql/data start

and then

ps aux

the root postgres process shows as:

/usr/local/bin/postgres -D /usr/local/pgsql/data

However, if I manually do a restart:

pg_ctl -D /usr/local/pgsql/data restart

the root postgres process shows as:

/usr/local/bin/postgres

i.e without the parameters.

The init script is not the problem as it invokes the same pg_ctl command
line in each case of start, stop, restart (apart from the start, stop,
restart bit of course).

Cheers,
Gary.