Hi all! I'm trying to run dagster using dagster-po...
# ask-community
д
Hi all! I'm trying to run dagster using dagster-postgres, the feature is db schema changed.
Copy code
storage:
  postgres:
    postgres_db:
      db_name: db
      hostname: localhost
      params: {
        options: "-csearch_path=snbx_dagster"
      }
      scheme: postgresql+psycopg2
      username: postgres
      password: ********
      port: 5432
I manage to start the daemon, the initialization in the database takes place (I see it), but when I start dagit, the service does not start, because cannot bind to schema and throws an error:
Copy code
dagster> dagit -p 3030
2022-12-05 20:31:01 +0300 - dagit - INFO - Serving dagit on <http://127.0.0.1:3030> in process 10768
Traceback (most recent call last):
  File "C:\dagster\venv\lib\site-packages\sqlalchemy\engine\base.py", line 1900, in _execute_context
    self.dialect.do_execute(
  File "C:\dagster\venv\lib\site-packages\sqlalchemy\engine\default.py", line 736, in do_execute
    cursor.execute(statement, parameters)
psycopg2.errors.UndefinedTable: ╬╪╚┴╩└:  юЄэю°хэшх "instance_info" эх ёє∙хёЄтєхЄ
LINE 2: FROM instance_info
             ^


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\dagster\venv\Scripts\dagit.exe\__main__.py", line 7, in <module>
  File "C:\dagster\venv\lib\site-packages\dagit\cli.py", line 181, in main
    cli(auto_envvar_prefix="DAGIT")  # pylint:disable=E1120
  File "C:\dagster\venv\lib\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "C:\dagster\venv\lib\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "C:\dagster\venv\lib\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\dagster\venv\lib\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "C:\dagster\venv\lib\site-packages\dagit\cli.py", line 133, in dagit
    host_dagit_ui_with_workspace_process_context(
  File "C:\dagster\venv\lib\site-packages\dagit\cli.py", line 166, in host_dagit_ui_with_workspace_process_context
    log_action(workspace_process_context.instance, START_DAGIT_WEBSERVER)
  File "C:\dagster\venv\lib\site-packages\dagster\_core\telemetry.py", line 494, in log_action
    (dagster_telemetry_enabled, instance_id, run_storage_id) = _get_instance_telemetry_info(
  File "C:\dagster\venv\lib\site-packages\dagster\_core\telemetry.py", line 333, in _get_instance_telemetry_info
    run_storage_id = instance.run_storage.get_run_storage_id()
  File "C:\dagster\venv\lib\site-packages\dagster\_core\storage\runs\sql_run_storage.py", line 778, in get_run_storage_id
    row = self.fetchone(query)
  File "C:\dagster\venv\lib\site-packages\dagster\_core\storage\runs\sql_run_storage.py", line 96, in fetchone
    result_proxy = conn.execute(query)
  File "C:\dagster\venv\lib\site-packages\sqlalchemy\engine\base.py", line 1380, in execute
    return meth(self, multiparams, params, _EMPTY_EXECUTION_OPTS)
  File "C:\dagster\venv\lib\site-packages\sqlalchemy\sql\elements.py", line 333, in _execute_on_connection
    return connection._execute_clauseelement(
  File "C:\dagster\venv\lib\site-packages\sqlalchemy\engine\base.py", line 1572, in _execute_clauseelement
    ret = self._execute_context(
  File "C:\dagster\venv\lib\site-packages\sqlalchemy\engine\base.py", line 1943, in _execute_context
    self._handle_dbapi_exception(
  File "C:\dagster\venv\lib\site-packages\sqlalchemy\engine\base.py", line 2124, in _handle_dbapi_exception
    util.raise_(
  File "C:\dagster\venv\lib\site-packages\sqlalchemy\util\compat.py", line 208, in raise_
    raise exception
  File "C:\dagster\venv\lib\site-packages\sqlalchemy\engine\base.py", line 1900, in _execute_context
    self.dialect.do_execute(
  File "C:\dagster\venv\lib\site-packages\sqlalchemy\engine\default.py", line 736, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) ╬╪╚┴╩└:  юЄэю°хэшх "instance_info" эх ёє∙хёЄтєхЄ
LINE 2: FROM instance_info
             ^

[SQL: SELECT instance_info.run_storage_id
FROM instance_info]
Has anyone already experienced this?
j
does the
instance_info
table exist in the
snbx_dagster
schema in your database?
д
yes, sure! when starting the daemon, it even creates an entry with the guid of the daemon
a
д
yes, I will try
thank you so much, @alex