bytebase / bytebase

The GitHub/GitLab for database DevOps. World's most advanced database DevOps and CI/CD for Developer, DBA and Platform Engineering teams.

Home Page:https://www.bytebase.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

permission denied to reassign objects (SQLSTATE 42501)

NewAlice opened this issue · comments

Provide the Bytebase version you are using

bytebase/bytebase:2.6.0

Describe the bug

time=2024-05-11T09:18:48.116Z level=INFO source=postgres/sample_instance.go:67 msg="Start sample instance test at port 8083"
waiting for server to start....2024-05-11 09:18:48.162 UTC [146] LOG: starting PostgreSQL 16.2 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.5.0-3ubuntu118.04) 7.5.0, 64-bit
2024-05-11 09:18:48.162 UTC [146] LOG: listening on Unix socket "/tmp/.s.PGSQL.8083"
2024-05-11 09:18:48.165 UTC [149] LOG: database system was shut down at 2024-05-11 09:18:46 UTC
2024-05-11 09:18:48.169 UTC [146] LOG: database system is ready to accept connections
done
server started
time=2024-05-11T09:18:48.229Z level=INFO source=postgres/sample_instance.go:67 msg="Start sample instance prod at port 8084"
waiting for server to start....2024-05-11 09:18:48.271 UTC [156] LOG: starting PostgreSQL 16.2 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.5.0-3ubuntu1
18.04) 7.5.0, 64-bit
2024-05-11 09:18:48.271 UTC [156] LOG: listening on Unix socket "/tmp/.s.PGSQL.8084"
2024-05-11 09:18:48.274 UTC [159] LOG: database system was shut down at 2024-05-11 09:18:48 UTC
2024-05-11 09:18:48.279 UTC [156] LOG: database system is ready to accept connections
done
server started
time=2024-05-11T09:18:48.341Z level=INFO source=postgres/sample_instance.go:76 msg="-----Sample Postgres Instance END-----"
time=2024-05-11T09:18:48.375Z level=INFO source=server/server.go:435 msg="Stopping Bytebase..."
time=2024-05-11T09:18:48.375Z level=INFO source=server/server.go:436 msg="Stopping web server..."
2024-05-11 09:18:48.377 UTC [146] LOG: received fast shutdown request
2024-05-11 09:18:48.378 UTC [146] LOG: aborting any active transactions
2024-05-11 09:18:48.380 UTC [146] LOG: background worker "logical replication launcher" (PID 152) exited with exit code 1
2024-05-11 09:18:48.380 UTC [147] LOG: shutting down
2024-05-11 09:18:48.380 UTC [147] LOG: checkpoint starting: shutdown immediate
2024-05-11 09:18:48.383 UTC [147] LOG: checkpoint complete: wrote 4 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.002 s, sync=0.001 s, total=0.004 s; sync files=3, longest=0.001 s, average=0.001 s; distance=0 kB, estimate=0 kB; lsn=0/1B17410, redo lsn=0/1B17410
2024-05-11 09:18:48.391 UTC [146] LOG: database system is shut down
2024-05-11 09:18:48.480 UTC [156] LOG: received fast shutdown request
2024-05-11 09:18:48.480 UTC [156] LOG: aborting any active transactions
2024-05-11 09:18:48.482 UTC [156] LOG: background worker "logical replication launcher" (PID 162) exited with exit code 1
2024-05-11 09:18:48.482 UTC [157] LOG: shutting down
2024-05-11 09:18:48.482 UTC [157] LOG: checkpoint starting: shutdown immediate
2024-05-11 09:18:48.485 UTC [157] LOG: checkpoint complete: wrote 4 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.002 s, sync=0.001 s, total=0.004 s; sync files=3, longest=0.001 s, average=0.001 s; distance=0 kB, estimate=0 kB; lsn=0/1B17410, redo lsn=0/1B17410
2024-05-11 09:18:48.495 UTC [156] LOG: database system is shut down
time=2024-05-11T09:18:48.580Z level=ERROR source=cmd/root.go:276 msg="Cannot new server" error="ERROR: permission denied to reassign objects (SQLSTATE 42501)"

██████╗ ██╗ ██╗███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝
██████╔╝ ╚████╔╝ █████╗
██╔══██╗ ╚██╔╝ ██╔══╝
██████╔╝ ██║ ███████╗
╚═════╝ ╚═╝ ╚══════╝

Steps to reproduce

  1. helm install bytebase bytebase -f bytebase/values.yaml -n bytebase
  2. kubectl logs -f bytebase-0 -n bytebase

Expected behavior

succeed

Provide the database you are using

postgreSQL

Provide the version control system you are using

bitnami/postgresql:16.1.0-debian-11-r20

Additional context

No response

Must be some permission grants according to https://www.bytebase.com/docs/get-started/install/external-postgres/#prerequisites

works with external pg now, thank you very much