X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/bc7f6209d83dcc161f093ce9907991facabb3491..3fb739de9275680d4f482d363f22c535442f0017:/nominatim/tools/tiger_data.py diff --git a/nominatim/tools/tiger_data.py b/nominatim/tools/tiger_data.py index 4a32bb1e..70cecae5 100644 --- a/nominatim/tools/tiger_data.py +++ b/nominatim/tools/tiger_data.py @@ -23,6 +23,7 @@ from nominatim.db.sql_preprocessor import SQLPreprocessor from nominatim.errors import UsageError from nominatim.data.place_info import PlaceInfo from nominatim.tokenizer.base import AbstractAnalyzer, AbstractTokenizer +from nominatim.tools import freeze LOG = logging.getLogger() @@ -113,6 +114,13 @@ def add_tiger_data(data_dir: str, config: Configuration, threads: int, """ dsn = config.get_libpq_dsn() + with connect(dsn) as conn: + is_frozen = freeze.is_frozen(conn) + conn.close() + + if is_frozen: + raise UsageError("Tiger cannot be imported when database frozen (Github issue #3048)") + with TigerInput(data_dir) as tar: if not tar: return 1