RefLib

Reference library for AI

Back

postgresql_16:7.3.12.8 Examples

PostgreSQL 16 > Reference > PostgreSQL Server Applications > postgres > Examples

To start postgres in the background using default values, type: $ nohup postgres >logfile 2>&1 </dev/null &

To start postgres with a specific port, e.g., 1234: $ postgres -p 1234 To connect to this server using psql, specify this port with the -p option: $ psql -p 1234 or set the environment variable PGPORT: $ export PGPORT=1234 $ psql

Named run-time parameters can be set in either of these styles: $ postgres -c work_mem=1234 $ postgres --work-mem=1234 Either form overrides whatever setting might exist for work_mem in postgresql.conf. Notice that underscores in parameter names can be written as either underscore or dash on the command line. Except for short-term experiments, it's probably better practice to edit the setting in postgresql.conf than to rely on a command-line switch to set a parameter.

Back