From 2423d869146fa513caf1eb5c6c0a452235f70e05 Mon Sep 17 00:00:00 2001 From: Matt Amos Date: Wed, 9 Oct 2019 12:13:27 +0100 Subject: [PATCH] Make documentation clearer and shorter by deferring complicated shared-library SQL explanations to 'advanced' documentation. Also mention in the CONFIGURING.md. --- CONFIGURE.md | 2 ++ INSTALL.md | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CONFIGURE.md b/CONFIGURE.md index 91a64119e..42f65b5c1 100644 --- a/CONFIGURE.md +++ b/CONFIGURE.md @@ -131,3 +131,5 @@ If you want to deploy The Rails Port for production use, you'll need to make a f * The included version of the GPX importer is slow and/or completely inoperable. You should consider using [the high-speed GPX importer](https://git.openstreetmap.org/gpx-import.git/). * Make sure you generate the i18n files and precompile the production assets: `RAILS_ENV=production rake i18n:js:export assets:precompile` * Make sure the web server user as well as the rails user can read, write and create directories in `tmp/`. +* If you want to use diff replication then you will need to install the shared library versions of the special SQL functions (see the bottom of [INSTALL.md](INSTALL.md)). +* If you expect to serve a lot of `/changes` API calls, then you might also want to install the shared library versions of the SQL functions. diff --git a/INSTALL.md b/INSTALL.md index 641d1160a..cc191aebe 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -174,9 +174,7 @@ psql -d openstreetmap -c "CREATE EXTENSION btree_gist" ### PostgreSQL Functions -There are special database functions required by a (little-used) API call, the migrations and diff replication. The former two are provided as *either* pure SQL functions or a compiled shared library. It is recommended that you start with the pure SQL versions, as described below, and only install the compiled shared library if you are running a production server making a lot of `/changes` API calls or need the diff replication functionality. - -If you aren't sure which you need, install the SQL version below. +We need to install some special functions into the PostgreSQL database: ``` psql -d openstreetmap -f db/functions/functions.sql @@ -218,9 +216,11 @@ Note that the OSM map tiles you see aren't created from your local database - th After installing this software, you may need to carry out some [configuration steps](CONFIGURE.md), depending on your tasks. -# Installing compiled shared library database functions +# Installing compiled shared library database functions (optional) + +There are special database functions required by a (little-used) API call, the migrations and diff replication. The former two are provided as *either* pure SQL functions or a compiled shared library. The SQL versions are installed as part of the recommended install procedure above and the shared library versions are recommended only if you are running a production server making a lot of `/changes` API calls or need the diff replication functionality. -You probably only need to do this if you are running a large, production instance of openstreetmap-website. +If you aren't sure which you need, stick with the SQL versions. Before installing the functions, it's necessary to install the PostgreSQL server development packages. On Ubuntu this means: -- 2.39.5