[openstreetmap/openstreetmap-website] Remove need for shared library PostgreSQL functions (#2383)
notifications at github.com
Fri Oct 4 12:26:08 UTC 2019
This repo contains code for three functions to be loaded into PostgreSQL as a shared library:
1. `maptile_for_point`, which is used only by the `/changes` API call. This API call is little-used and IMHO should be deprecated and removed. However, even now it's hardly on the hot path for most development activities.
2. `tile_for_point`, which is used only in migrations. At this point, it seems unlikely that anyone will be doing a migration on existing data which would call this function (most developers will be running migrations on an empty database, to set it up).
3. `xid_to_int4`, which is only used for replication using Osmosis and isn't used in the Rails code at all. Hopefully this will be replaced Real Soon Now, but until then it's a quite advanced feature that most developers won't need.
Therefore, this patch proposes to replace the above three shared library functions with SQL implementations of the first two. These are _much_ slower - by a factor of about 30x, however this makes no difference when they're run on a completely empty database. In return, we're able to drop a dependency on the PostgreSQL server development package, and clean a few lines out of the installation instructions.
It's still possible to make and install the shared library functions, and I've included instructions about how to do that - although it shouldn't be necessary for the vast majority of `openstreetmap-website` developers.
You can view, comment on, or merge this pull request online at:
-- Commit Summary --
* Remove need for shared library PostgreSQL functions
-- File Changes --
M .travis.yml (6)
M INSTALL.md (59)
A db/functions/functions.sql (70)
M script/vagrant/setup/provision.sh (29)
-- Patch Links --
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rails-dev