Opened 4 months ago
Last modified 3 months ago
#5771 new defect
address_standardizer_data_us upgrade sql script can be incorrect
Reported by: | evsi | Owned by: | pramsey |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 3.4.4 |
Component: | postgis | Version: | 3.4.x |
Keywords: | Cc: |
Description
Hi, there seems to be a problem with the way the way that address_standardizer_data_us upgrade sql script is handled during the build step in 3.4.0 and up. The address_standardizer_data_us upgrade file can end up being identical to that of address_standardizer.
To re-produce (I was using Amazon Linux 2 x86 GNU Make 3.82):
cd postgis-$POSTGIS_VERSION_NUM/extensions make touch ./address_standardizer/sql/address_standardizer_functions.sql make install diff address_standardizer/sql/address_standardizer--ANY--$POSTGIS_VERSION_NUM.sql address_standardizer/sql/address_standardizer_data_us--ANY--$POSTGIS_VERSION_NUM.sql | wc -l
and notice the result value is 0 (i.e. they are the exact same file), which is not expected.
(From my own looking)
When installation happens, the install-upgrade-paths target is called with EXTENSION set as address_standardizer_data_us link. This hits the generic target instead, which seems to be for address_standardizer link, rather than the one specifically for data_us.
When running make with parallelization the dependency 'sql/address_standardizer_functions.sql' can be newer than the target `sql/address_standardizer_data_us--ANY--<version>.sql', so the latter gets replaced with wrong upgrade script. (Hence the reproduction example just touches the file after make, to force the install target to "update" the script.)