add postgis tuning to speed up import

This commit is contained in:
Olivier DEBAUCHE 2021-06-10 16:43:16 +02:00 committed by GitHub
parent 083309db77
commit bbc02f5297
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

2
run.sh
View File

@ -37,6 +37,8 @@ if [ "$1" = "import" ]; then
sudo -u postgres createdb -E UTF8 -O renderer gis
sudo -u postgres psql -d gis -c "CREATE EXTENSION postgis;"
sudo -u postgres psql -d gis -c "CREATE EXTENSION hstore;"
sudo -u postgres psql -d gis -c "ALTER SYSTEM SET work_mem='16MB';"
sudo -u postgres psql -d gis -c "ALTER SYSTEM SET maintenance_work_mem='256MB';"
sudo -u postgres psql -d gis -c "ALTER TABLE geometry_columns OWNER TO renderer;"
sudo -u postgres psql -d gis -c "ALTER TABLE spatial_ref_sys OWNER TO renderer;"
setPostgresPassword