[Tile-serving] [osm2pgsql-dev/osm2pgsql] Changing parameter maintenance_work_mem = 10GB results in error Postgresql 17 (Discussion #2375)

pimmierevrev notifications at github.com
Sun Aug 10 07:40:09 UTC 2025


Hello,

Thank you, didn't notice that.

Above all: wonderfull piece of software, osm2pgsql. Recently switched to lua file. I use visual studio code and python to fully automate
The download off Europe
The extraction of the Netherlands
The import into postgresql
The creationist of views
Additional stuff

Apart from the above mentioned hickup, all works like a charm.

Kind regards,

Pim Verver

Verzonden vanaf Outlook voor Android<https://aka.ms/AAb9ysg>
________________________________
From: ImreSamu ***@***.***>
Sent: Saturday, August 9, 2025 6:16:23 PM
To: osm2pgsql-dev/osm2pgsql ***@***.***>
Cc: pimmierevrev ***@***.***>; Mention ***@***.***>
Subject: Re: [osm2pgsql-dev/osm2pgsql] Changing parameter maintenance_work_mem = 10GB results in error Postgresql 17 (Discussion #2375)


Tell us something about your system
64GB RAM

Hi @pimmierevrev<https://github.com/pimmierevrev> ,

The example configuration
at https://osm2pgsql.org/doc/manual.html#tuning-the-postgresql-server
is intended for a machine with "128 GB RAM and a fast SSD".

If you have less memory (e.g., 64 GB in your case),
the values should be scaled down accordingly.
As the documentation mentions:

" If your machine has very little memory, you might consider setting autovacuum_max_workers = 1 and reduce autovacuum_work_mem even further. This will reduce the amount of memory that autovacuum takes away from the import process."

for example:

# Options for fast SSD
shared_buffers = 1GB
work_mem = 50MB
wal_level = minimal
checkpoint_timeout = 60min
max_wal_size = 10GB
checkpoint_completion_target = 0.9
max_wal_senders = 0
random_page_cost = 1.0

# Scaled-down memory settings (for less RAM)
maintenance_work_mem = 3GB
autovacuum_work_mem = 1GB
autovacuum_max_workers = 1


And since PostgreSQL’s memory usage and performance can differ slightly on Windows compared to Linux, you may need to reduce these values even further.
This is especially true if, in addition to the PostgreSQL server and osm2pgsql, you are also running a browser and many other programs in the background, as they all share the same 64 GB of RAM.

And as mentioned before, it is also worth checking the PostgreSQL log.

—
Reply to this email directly, view it on GitHub<https://github.com/osm2pgsql-dev/osm2pgsql/discussions/2375#discussioncomment-14058192>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AVFYIEJDQPVOA4REO7OQT3D3MYNFPAVCNFSM6AAAAACDQCO6NKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTIMBVHAYTSMQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>


-- 
Reply to this email directly or view it on GitHub:
https://github.com/osm2pgsql-dev/osm2pgsql/discussions/2375#discussioncomment-14062374
You are receiving this because you are subscribed to this thread.

Message ID: <osm2pgsql-dev/osm2pgsql/repo-discussions/2375/comments/14062374 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20250810/d3f256ee/attachment-0001.htm>


More information about the Tile-serving mailing list