Docs: update database process

This commit is contained in:
Pieter Vander Vennet 2025-04-25 16:24:03 +02:00
parent 918225409a
commit ed49bc2f2f

View file

@ -6,8 +6,10 @@
Increase the max number of connections. osm2pgsql needs connection one per table (and a few more), and since we are making one table per layer in MapComplete, this amounts to a lot.
- Open PGAdmin, open the PGSQL-tool (CLI-button at the top)
- Run `max_connections = 2000;` and `show config_file;` to get the config file location (in docker). This is probably `/var/lib/postgresql/data/postgresql.conf`
- Open PGAdmin, open the PGSQL-tool (CLI-button at the top); alternativly: psql --host=172.17.0.1 --port=5444
--user=user
- Run `show config_file;` to get the config file location (in docker). This is probably
`/var/lib/postgresql/data/postgresql.conf`
- In a terminal, run `sudo docker exec -i <docker-container-id> bash` (run `sudo docker ps` to get the container id)
- `sed -i "s/max_connections = 100/max_connections = 5000/" /var/lib/postgresql/data/postgresql.conf`
- Validate with `cat /var/lib/postgresql/data/postgresql.conf | grep "max_connections"`