2 Implementation of the 'freeze' subcommand.
 
   5 from ..db.connection import connect
 
   7 # Do not repeat documentation of subcommand classes.
 
   8 # pylint: disable=C0111
 
   9 # Using non-top-level imports to avoid eventually unused imports.
 
  10 # pylint: disable=E0012,C0415
 
  14     Make database read-only.
 
  16     About half of data in the Nominatim database is kept only to be able to
 
  17     keep the data up-to-date with new changes made in OpenStreetMap. This
 
  18     command drops all this data and only keeps the part needed for geocoding
 
  21     This command has the same effect as the `--no-updates` option for imports.
 
  30         from ..tools import freeze
 
  32         with connect(args.config.get_libpq_dsn()) as conn:
 
  33             freeze.drop_update_tables(conn)
 
  34         freeze.drop_flatnode_file(args.config.FLATNODE_FILE)