4 months ago
    Hi, I've set up a Postgres Orion database for registering the states of flows/tasks etc. I noticed they create a structure in public schema. Is it possible to have it create the structure in say prefect-Orion? Use case is that I may want to set up logical replication from that database to another and I would prefer to avoid public (it's already in use by some other database. )
    Anna Geller

    Anna Geller

    4 months ago
    You may have multiple logical databases inside of your Postgres instance. One possibility is to have the default
    DB for one thing, and then you may use
    database for Prefect 2.0. Here is how you could configure that:
    export PREFECT_ORION_DATABASE_CONNECTION_URL="<postgresql+asyncpg://postgres:yourTopSecretPassword@localhost:5432/orion>"
    Alternatively, you may consider creating an individual Postgres instance for Prefect 2.0 which may be easier to separate concerns, scale and manage it long term. Especially, as it's so easy these days to spin up multiple (even fully managed) Postgres databases in the public cloud, managing multiple applications within the same logical database only by separating it via schema, feels like adding unnecessary complexity