Closed iyesin closed 3 years ago
Can you check the Postgres log in the container why it's failing to create the database schema? Should be executed by postgres
user, so it's strange why that fails.
@FxKu all logs are attached. I wasn't able to find an answer there. That's the reason I created this ticket.
You attached operator and patroni (pod) logs. I mean the Postgres (database server) logs inside the container.
@FxKu sorry, it was unknown to me that pg instance inside spilo container is dumping logs to pgdata dir. huh-test-0.tar.gz huh-test-1.tar.gz huh-test-2.tar.gz
The permission error happens because tdb_owner
is not the actual owner of the database hence cannot create schemas there. In your manifest you have also listed tdb
under databases
section, with puser as the owner. Atm it is not checked for preparedDatabases
that there's another owner. Would also be a bit counter-intuitive when there's an owner role.
You can remove the databases
section and the owner should be altered. The the schema creation will also work and the snyc should be successful.
@FxKu , thank you! Both solutions helped on their own:
database
manifest section<database_name>_owner
How can I configure the owner difference with
registry.opensource.zalan.do/acid/postgres-operator:v1.6.3
as latest available in./charts
K8s ontop of vCenter
no
Bug report
orquestion
Situation
After running installation snippet with attached postgres-cluster spec I was expecting fully-functional PostgreSQL cluster. Unfortunately, my experience was opposite. PostgresSQL cluster stuck in
SyncFailed
status. Detailedkubectl describe postgresqls huh-test
didn't reveal any thing meaningful to me. Last messages was:See full output in postres-operator.state.log.
While going through
postgres-operator
logs I found same error. I tried to exclude all kinds of authentication errors and leavedAll from Everywhere to Everything
type of rules in my pg_hba.conf. It looks like this does not work in this exact case. You can see this in my config.The question
Is it something wrong with configuration and such behavior is expected (then I would like to know what exactly I'm doing wrong) OR this is sort of bug (then workaround would be highly appreciated).
Installation snippet
PostgreSQL cluster spec
create-test-cluster.yaml.gz
Detailed logs from all pods
postres-operator.log huh-test-0.log huh-test-1.log huh-test-2.log