<div dir="ltr">You may also look at the OpenMapTiles database setup [1], and related [2] GCP PG startup script that does some perf optimizations. These optimizations are tuned towards to batch MVT tile generation (using ST_AsMVT), but should also be applicable for realtime tilegen.<div><br></div><div>[1] <a href="https://github.com/openmaptiles/openmaptiles-tools/blob/master/docs/database.md">https://github.com/openmaptiles/openmaptiles-tools/blob/master/docs/database.md</a></div><div>[2] <a href="https://github.com/openmaptiles/openmaptiles-tools/blob/master/docs/gcp_startup.sh">https://github.com/openmaptiles/openmaptiles-tools/blob/master/docs/gcp_startup.sh</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 6, 2021 at 3:59 PM Stephan Knauss <<a href="mailto:osm@stephans-server.de">osm@stephans-server.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello fellow developers,<br>
<br>
where would be a good location to document settings to tune on <br>
PostgreSQL when setting up a rendering database?<br>
<br>
There is a section within osm2pgsql, but maintainers hint that this <br>
might not be such a good location for settings potentially relevant for <br>
rendering.<br>
<br>
<a href="https://github.com/openstreetmap/osm2pgsql-website/pull/12" rel="noreferrer" target="_blank">https://github.com/openstreetmap/osm2pgsql-website/pull/12</a><br>
<br>
In the wiki I found a page about PostgreSQL tuning, but this hints <br>
towards storing OSM data as per API access:<br>
<br>
<a href="https://wiki.openstreetmap.org/wiki/PostgreSQL" rel="noreferrer" target="_blank">https://wiki.openstreetmap.org/wiki/PostgreSQL</a><br>
<br>
<br>
I have not found any mentioning of database settings in <br>
openstreetmap-carto. Could that be a location to store such details?<br>
<br>
<a href="https://github.com/gravitystorm/openstreetmap-carto/blob/master/INSTALL.md" rel="noreferrer" target="_blank">https://github.com/gravitystorm/openstreetmap-carto/blob/master/INSTALL.md</a><br>
<br>
<br>
I am thinking of content similar to what is within the osm2pgsql manual, <br>
probably starting with a copy and focusing on aspects of map rendering.<br>
<br>
Especially the memory leak with PostgreSQL 12+ and using jit while <br>
rendering and the additional load impact of parallel workers without <br>
benefit seems worth to document. These are default settings of <br>
PostgreSQL and need adjustment.<br>
<br>
Stephan<br>
<br>
<br>
<br>
_______________________________________________<br>
dev mailing list<br>
<a href="mailto:dev@openstreetmap.org" target="_blank">dev@openstreetmap.org</a><br>
<a href="https://lists.openstreetmap.org/listinfo/dev" rel="noreferrer" target="_blank">https://lists.openstreetmap.org/listinfo/dev</a><br>
</blockquote></div>