]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/tools/tiger_data.py
add geometry details for postcode area output
[nominatim.git] / nominatim / tools / tiger_data.py
index 4a32bb1ebf93848b0126d0dfd31b5b0bd472c858..70cecae58648997f0bc6a81a863fee7b420432f5 100644 (file)
@@ -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