From 912ccad82acea8de7a8977e65d4a0a14a00e3400 Mon Sep 17 00:00:00 2001 From: Iain Date: Tue, 26 Nov 2024 16:54:12 +0100 Subject: [PATCH] chore: make self-hosted configuration easier to understand. --- self-hosted/configuration/postgres-config.md | 38 +++++++++++++------- 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/self-hosted/configuration/postgres-config.md b/self-hosted/configuration/postgres-config.md index 887a296888..483df9c1a1 100644 --- a/self-hosted/configuration/postgres-config.md +++ b/self-hosted/configuration/postgres-config.md @@ -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://:@:/" + ``` + 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