![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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. |

:P:sU:wW", long_options, &option_index)) != -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. |
#3
| |||
| |||
|
|
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: |
#4
| |||
| |||
|
|
Alvaro Herrera <alvherre (AT) commandprompt (DOT) com> writes: 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: Good catch, but I'd suggest not just removing the write_stderr but adding a comment in its place: /* getopt_long already issued a suitable error message */ Please commit fix in all relevant branches. |
#5
| |||
| |||
|
|
In my system, on 7.4, contrib/pg_dumplo is linked against the system's getopt_long, not against our version. So the current code is OK -- but if on some platform there is no getopt_long, I suspect our version would be picked, which causes a problem. What should we do about it? One thought is leave it alone -- it's an old branch and no one has ever noticed this problem before. On the other hand, this may possibly be a security issue. |
![]() |
| Thread Tools | |
| Display Modes | |
| |