Closed rustprooflabs closed 3 months ago
Commands used for testing for reference:
export POSTGRES_USER=postgres
export POSTGRES_PASSWORD=mysecretpassword
docker stop pgosm && docker build -t rustprooflabs/pgosm-flex .
docker run --name pgosm -d --rm \
-v ~/pgosm-data:/app/output \
-v /etc/localtime:/etc/localtime:ro \
-e POSTGRES_USER=$POSTGRES_USER \
-e POSTGRES_PASSWORD=$POSTGRES_PASSWORD \
-p 5433:5432 -d rustprooflabs/pgosm-flex
docker exec -it \
pgosm python3 docker/pgosm_flex.py \
--ram=8 \
--region=north-america/us \
--subregion=district-of-columbia \
--update create
docker exec -it \
pgosm python3 docker/pgosm_flex.py \
--ram=8 \
--region=north-america/us \
--subregion=maryland \
--update append
Details
This PR addresses #397 reported by @jhon100, and other issues exposed by investigating that bug report.
Overview
Running
--update append
was missing the pre/post steps used by the--replication
mode to avoid similar errors. The prep step is now handled in one place for both. The post step is handled in one place each due to differing code paths.Tasks
--update append
update shouldn't require--force
--skip-nested
--update append
to avoid FK error when nested data previously loaded--update
mode--replication
to verify there wasn't a regression