Skip to main content
4 of 4
replaced http://dba.stackexchange.com/ with https://dba.stackexchange.com/

Reading the documentation page for pg_ctl carefully shows you what happens with the stuff you pass to it using -o:

-o options

Specifies options to be passed directly to the postgres command; multiple option invocations are appended.

So you can, for example, do the following:

pg_ctl -D {your data directory} -o "-c listen_addresses='*'" start

where the whole double-quoted expression is passed to postgres (for details, see its own documentation).

As Craig Ringer pointed out in a comment, it might be easier and, more importantly, has a lasting effect if you change these parameters using ALTER SYSTEM.

András Váczi
  • 31.6k
  • 13
  • 101
  • 149