[Tile-serving] [osm2pgsql] Enhance with a datamodel option, using JSONB (#533)

Peter notifications at github.com
Sat Feb 27 10:35:10 UTC 2016


Hello, thanks for all (@drkludge , @ImreSamu , @pnorman), I think there are some commom understand about JSONB datatype in persistent storage (most of osm2pgsql users need *tags*  only to read) advantages (!) and the relevance to offer an option to this *standard format* (JSON(B) is a standard and a build-in format) .

Next step (in a "roadmap" to this issue) will be basic implementation and sub-options:

* **Options `--json` and `--jsonb`** are possible, but I recomend use of JSONB only.
 
* **Simplest implementation**: Simplest but CPU-time consuming and disk consuming. Use [`hstore_to_json()`](http://www.postgresql.org/docs/9.5/static/hstore.html) and [`json_object()`](http://www.postgresql.org/docs/9.5/static/functions-json.html) as [suggested here](http://stackoverflow.com/a/35617429/287948), and `ALTER TABLE` to add new columns and (after convertion) drop old columns.

* **Better implementation** (no add/convert/drop columns): need some review and development. A first and simplest optiomization is to convert extra-tags (today this is the *hstore* option) directly into JSOB, without need for `hstore_to_json`.

* **Other (sub) options**: the main is to simplify table (SQL structures), moving some non-indexed columns  to the JSONB structure... We need first (to discuss) to document structure, as suggested at issue #535 (must reopen).
 


---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/533#issuecomment-189616892
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20160227/65113422/attachment.html>


More information about the Tile-serving mailing list