HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

postgres — Run the PostgreSQL database server. More information: <https://www.postgresql.org/docs/current/app-p

Submitted by: @import:tldr-pages··
0
Viewed 0 times
theservercommandrunpostgresqldatabaseclipostgres

Problem

How to use the postgres command: Run the PostgreSQL database server. More information: <https://www.postgresql.org/docs/current/app-postgres.html>.

Solution

postgres — Run the PostgreSQL database server. More information: <https://www.postgresql.org/docs/current/app-postgres.html>.

Start the server on a specific port (defaults to 5432):
postgres -p {{5433}}


Set a runtime parameter (short form):
postgres -c {{shared_buffers=128MB}}


Set a runtime parameter (long form):
postgres --{{shared-buffers}}={{128MB}}


Start in single-user mode for a specific database (defaults to the user name):
postgres --single -D {{path/to/datadir}} {{my_database}}

Code Snippets

Start the server on a specific port (defaults to 5432)

postgres -p {{5433}}

Set a runtime parameter (short form)

postgres -c {{shared_buffers=128MB}}

Set a runtime parameter (long form)

postgres --{{shared-buffers}}={{128MB}}

Start in single-user mode for a specific database (defaults to the user name)

postgres --single -D {{path/to/datadir}} {{my_database}}

Context

tldr-pages: common/postgres

Revisions (0)

No revisions yet.