Обсуждение: BUG #3784: pg_ctl fails to start server when called with -c parameters

Поиск
Список
Период
Сортировка

BUG #3784: pg_ctl fails to start server when called with -c parameters

От
"Stephen Bespalko"
Дата:
The following bug has been logged online:

Bug reference:      3784
Logged by:          Stephen Bespalko
Email address:      sjbespa@comcast.net
PostgreSQL version: 8.2.5
Operating system:   Mac OS X 10.5
Description:        pg_ctl fails to start server when called with -c
parameters
Details:

The following start statement fails, after about 60 seconds:

bash-3.2$
"/Users/sjbespa/Desktop/MDP.v8/MacDentPro/MacDentPro/build/Development/MacDe
ntPro 10.5.app/Contents/Resources/postgresql/bin/pg_ctl" -w -D
"/Users/sjbespa/pgsql.abqdental.8.2.intel.test/data" -l
"/Users/sjbespa/pgsql.abqdental.8.2.intel.test/postgresLogfile" -o '-p 7147
-c log_line_prefix="t2453888748:r:" -c log_error_verbosity=VERBOSE -c
log_min_messages=INFO -c log_min_error_statement=INFO -c
log_connections=true -c log_disconnections=true' start
waiting for server to
start...............................................................could
not start server

however the same basic statement without the -c parameters works fine:

bash-3.2$
"/Users/sjbespa/Desktop/MDP.v8/MacDentPro/MacDentPro/build/Development/MacDe
ntPro 10.5.app/Contents/Resources/postgresql/bin/pg_ctl" -w -D
"/Users/sjbespa/pgsql.abqdental.8.2.intel.test/data"  -o '-p 7147'
startwaiting for server to start....LOG:  could not bind IPv6 socket:
Address already in useHINT:  Is another postmaster already running on port
7147? If not, wait a few seconds and retry.
LOG:  database system was shut down at 2007-11-27 18:28:05 MST
LOG:  checkpoint record is at 0/2E55F30
LOG:  redo record is at 0/2E55F30; undo record is at 0/0; shutdown TRUE
LOG:  next transaction ID: 0/2565; next OID: 17130
LOG:  next MultiXactId: 1; next MultiXactOffset: 0
LOG:  database system is ready
 done
server started

From what I can tell, it appears that the parameters specified with the -c
flags are legitimate... If this is not a blunder on my part, I would be
happy to investigate further with a bit of help.

I have modified the postgres programs in /bin with an OS X relative path to
the postgres dynamic library (libpq.5.dylib), so the dbm could be embedded
in an OS X application bundle. I can't see how that would contribute to the
symptoms given that the program works without the offending switches.

Best regards,
Stephen J. Bespalko

Re: BUG #3784: pg_ctl fails to start server when called with -c parameters

От
Bruce Momjian
Дата:
Please check the database server logs to see if it has any reason for
the failure.

---------------------------------------------------------------------------

Stephen Bespalko wrote:
>
> The following bug has been logged online:
>
> Bug reference:      3784
> Logged by:          Stephen Bespalko
> Email address:      sjbespa@comcast.net
> PostgreSQL version: 8.2.5
> Operating system:   Mac OS X 10.5
> Description:        pg_ctl fails to start server when called with -c
> parameters
> Details:
>
> The following start statement fails, after about 60 seconds:
>
> bash-3.2$
> "/Users/sjbespa/Desktop/MDP.v8/MacDentPro/MacDentPro/build/Development/MacDe
> ntPro 10.5.app/Contents/Resources/postgresql/bin/pg_ctl" -w -D
> "/Users/sjbespa/pgsql.abqdental.8.2.intel.test/data" -l
> "/Users/sjbespa/pgsql.abqdental.8.2.intel.test/postgresLogfile" -o '-p 7147
> -c log_line_prefix="t2453888748:r:" -c log_error_verbosity=VERBOSE -c
> log_min_messages=INFO -c log_min_error_statement=INFO -c
> log_connections=true -c log_disconnections=true' start
> waiting for server to
> start...............................................................could
> not start server
>
> however the same basic statement without the -c parameters works fine:
>
> bash-3.2$
> "/Users/sjbespa/Desktop/MDP.v8/MacDentPro/MacDentPro/build/Development/MacDe
> ntPro 10.5.app/Contents/Resources/postgresql/bin/pg_ctl" -w -D
> "/Users/sjbespa/pgsql.abqdental.8.2.intel.test/data"  -o '-p 7147'
> startwaiting for server to start....LOG:  could not bind IPv6 socket:
> Address already in useHINT:  Is another postmaster already running on port
> 7147? If not, wait a few seconds and retry.
> LOG:  database system was shut down at 2007-11-27 18:28:05 MST
> LOG:  checkpoint record is at 0/2E55F30
> LOG:  redo record is at 0/2E55F30; undo record is at 0/0; shutdown TRUE
> LOG:  next transaction ID: 0/2565; next OID: 17130
> LOG:  next MultiXactId: 1; next MultiXactOffset: 0
> LOG:  database system is ready
>  done
> server started
>
> >From what I can tell, it appears that the parameters specified with the -c
> flags are legitimate... If this is not a blunder on my part, I would be
> happy to investigate further with a bit of help.
>
> I have modified the postgres programs in /bin with an OS X relative path to
> the postgres dynamic library (libpq.5.dylib), so the dbm could be embedded
> in an OS X application bundle. I can't see how that would contribute to the
> symptoms given that the program works without the offending switches.
>
> Best regards,
> Stephen J. Bespalko
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>        choose an index scan if your joining column's datatypes do not
>        match

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://postgres.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

Re: BUG #3784: pg_ctl fails to start server when called with -c parameters

От
Tom Lane
Дата:
"Stephen Bespalko" <sjbespa@comcast.net> writes:
> The following start statement fails, after about 60 seconds:

> bash-3.2$
> "/Users/sjbespa/Desktop/MDP.v8/MacDentPro/MacDentPro/build/Development/MacDe
> ntPro 10.5.app/Contents/Resources/postgresql/bin/pg_ctl" -w -D
> "/Users/sjbespa/pgsql.abqdental.8.2.intel.test/data" -l
> "/Users/sjbespa/pgsql.abqdental.8.2.intel.test/postgresLogfile" -o '-p 7147
> -c log_line_prefix="t2453888748:r:" -c log_error_verbosity=VERBOSE -c
> log_min_messages=INFO -c log_min_error_statement=INFO -c
> log_connections=true -c log_disconnections=true' start
> waiting for server to
> start...............................................................could
> not start server

What I think happened here is that the postmaster started fine, but
pg_ctl didn't know about the nonstandard port number and so was unable
to contact it to verify that it was up.  Did you look into
postgresLogfile for messages?

Usually the best bet for working with nondefault port numbers is to
compile them into all the executables (configure --with-pgport=NNNN).
Then everything Just Works and you don't have to think about it.
If that's not workable then try "export PGPORT=NNNN".

            regards, tom lane