Skip to content

gitea does not start - can not find public schema  #5152

@volker-raschek

Description

@volker-raschek
  • Gitea version: 1.5.2 (docker)
  • Git version: 2.19.1
  • Operating system: Debian
  • Database (use [x]):
    • PostgreSQL
  • Can you reproduce the bug at https://try.gitea.io:
    • Not relevant

Hello, I have multiple instances for gitea. Every installation should use one big postgres database with his own schema.

So I create for one instance his own schema and username and changed the search_path to disable querying statements to the public schema, because I don't want, that any application or instance create his schema into public.

Here my psql statements

CREATE SCHEMA gitea;
CREATE ROLE gitea WITH LOGIN;
ALTER USE gitea SET search_path=gitea;
GRANT ALL ON SCHEMA gitea to gitea;

After installation gitea does not start and I get in my logs every time the same error.

root@vgttp:/srv/docker/gitea_01/data/gitea/log# tailf xorm.log
2018/10/23 20:37:33 [I] PING DATABASE postgres
2018/10/23 20:37:33 [I] [SQL] SELECT tablename FROM pg_tables WHERE schemaname = $1 AND tablename = $2 []interface {}{"public", "version"}
2018/10/23 20:37:33 [I] [SQL] CREATE TABLE IF NOT EXISTS "version" ("id" BIGSERIAL PRIMARY KEY  NOT NULL, "version" BIGINT NULL)
2018/10/23 20:37:33 [I] [SQL] SELECT column_name FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = $1 AND table_name = $2 AND column_name = $3 [public version id]
2018/10/23 20:37:33 [I] [SQL] ALTER TABLE "version" ADD "id" BIGSERIAL PRIMARY KEY  NOT NULL ;

Gitea look in the public schema? I have installed the instance into his own schema! How can I change in my docker-compose or app.ini the schema name?

Volker

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedtype/enhancementAn improvement of existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions