Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: make self-hosted configuration easier to understand. #3624

Open
wants to merge 2 commits into
base: latest
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 26 additions & 12 deletions self-hosted/configuration/postgres-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,37 @@ For some common configuration settings you might want to adjust, see the
For more information about the PostgreSQL configuration page, see the
[PostgreSQL documentation][pg-config].

## Editing the PostgreSQL configuration file
## Edit the PostgreSQL configuration file

The location of the PostgreSQL configuration file depends on your operating
system and installation. You can find the location by querying the database as
the `postgres` user, from the psql prompt:
system and installation.

```sql
SHOW config_file;
```
1. **Find the location of the config file for your Postgres instance**
1. Connect to your database:
```shell
psql -d "postgres://<username>:<password>@<host>:<port>/<database-name>"
```
1. Retrieve the database file location from the database internal configuration.
```sql
SHOW config_file;
```
Postgres returns the path to your configuration file. For example:
```sql
--------------------------------------------
/home/postgres/pgdata/data/postgresql.conf
(1 row)
```

The configuration file requires one parameter per line. Blank lines are ignored,
and you can use a `#` symbol at the beginning of a line to denote a comment.
1. **Open the config file, then [edit your postgres configuration][pg-config]**
```shell
vi /home/postgres/pgdata/data/postgresql.conf
```

1. **Save your updated configuration**

When you have made changes to the configuration file, the new configuration is
not applied immediately. The configuration file is reloaded whenever the server
receives a `SIGHUP` signal, or you can manually reload the file uses the
`pg_ctl` command.
When you have saved the changes you make to the configuration file, the new configuration is
not applied immediately. The configuration file is automatically reloaded when the server
receives a `SIGHUP` signal. To manually reload the file, use the `pg_ctl` command.

## Setting parameters at the command prompt

Expand Down
Loading