Skip to content

Commit

Permalink
chore: make self-hosted configuration easier to understand. (#3624)
Browse files Browse the repository at this point in the history
  • Loading branch information
billy-the-fish authored Dec 12, 2024
1 parent 8708fd9 commit 0dfcd48
Showing 1 changed file with 26 additions and 12 deletions.
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

0 comments on commit 0dfcd48

Please sign in to comment.