rustprooflabs / pgosm-flex

PgOSM Flex provides high quality OpenStreetMap datasets in PostGIS (Postgres) using the osm2pgsql Flex output.
MIT License
101 stars 20 forks source link

Using `--pgosm-date` on refresh with `--replication` reports invalid date #294

Closed rustprooflabs closed 1 year ago

rustprooflabs commented 1 year ago

What version of PgOSM Flex are you using?

0.7.0.rc.1 via Docker

What did you do exactly?

Steps outlined in https://github.com/rustprooflabs/pgosm-flex/issues/293#issuecomment-1396371476, but for the second docker exec leave in the --pgosm-date 2022-12-30. (Context: Today is 2023-01-18). Using osm2pgsql-replication will update to today's data, but osm.pgosm_flex.osm_date reports the value given (2022-12-30).

What did you expect to happen?

When osm2pgsql-replication is updating the data, the --pgosm-date should be ignored. I'm leaning towards failing the subsequent load with --replication if --pgosm-date is provided.

Currently I can get results like this...

SELECT id, imported, osm_date, pgosm_flex_version,
        osm2pgsql_mode
    FROM osm.pgosm_flex
    ORDER BY imported
;
id|imported                     |osm_date  |pgosm_flex_version|osm2pgsql_mode|
--+-----------------------------+----------+------------------+--------------+
 1|2023-01-18 19:43:17.405 -0700|2022-12-30|0.7.0.rc.1-e4eec24|create        |
 2|2023-01-18 19:44:26.132 -0700|2023-01-18|0.7.0.rc.1-e4eec24|append        |
 3|2023-01-18 19:53:55.083 -0700|2022-12-30|0.7.0.rc.1-e4eec24|append        |