Re: BUG #2495: -i start up option blows pg_ctl program.

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Ermest <whitelaw(at)netc(dot)pt>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2495: -i start up option blows pg_ctl program.
Date: 2006-06-24 02:23:06
Message-ID: 20060624022306.GC11847@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Ermest wrote:

> When I attempt to configure postgres to allow tcpip connections by adding
> the -i option at startup, pg_ctl bombs by referencing address 0x0000. The
> -i is added to the service startup parameters via the Registry.

There is indeed a bug in pg_ctl here. We are reporting an error which
getopt_long already reported; and furthermore, optarg is not set by that
function in case of error. This is the fix:

while ((c = getopt_long(argc, argv, "D:l:m:N:o:p:P:sU:wW", long_options, &option_index)) != -1)
{
switch (c)
{
...
case default:
- write_stderr(_("%s: invalid option %s\n"), progname, optarg);
do_advice();
exit(1);

> I note also,"tcpip_socketi does not appear in installed postgresql.conf
> Adding tcpip_socket=true had no effect on the -i bomb out.

No, the tcpip_socket option was removed in 8.0. Use listen_interfaces
instead.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2006-06-24 03:32:05 Re: BUG #2495: -i start up option blows pg_ctl program.
Previous Message Ermest 2006-06-23 21:41:37 BUG #2495: -i start up option blows pg_ctl program.