Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

During the data import, will it be possible to create the indexes in parallel rather than sequencially? #398

Open
ghevge opened this issue Oct 10, 2023 · 1 comment

Comments

@ghevge
Copy link

ghevge commented Oct 10, 2023

Looking at the run.sh definition. it seems that the indexes creation is done by passing the indexes creation queries in a single script.
https://github.com/Overv/openstreetmap-tile-server/blob/master/run.sh#L115

This will generatly result in the sequencial indexes creation at the postgres level.

Starting with postgres 11, there is support available for parallel index creation.

Will this be feasable in openstreetmap-tile-server project context ?

Thanks

@Istador
Copy link
Contributor

Istador commented Oct 10, 2023

With postgresql 11 parallel index creation is enabled by default, so there's no need to change anything.

To fine tune it you might want to change the default max_parallel_maintenance_workers value of 2 (meaning two additional threads, for a total of 3) for larger imports in the postgresql.conf though.

As far as I understand it, this feature is using multiple threads indexing the same bigger table and not indexing different tables at the same time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants