canonical / canonical/postgresql-operator

invalid role(s) for extra user roles (admin)

Open
#1,059 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
20
Forks
36
Avg merge
4d 15h
Merged PRs (30d)
30

Description

## Steps to reproduce

1. deploy `postgresql` 16/stable in a VM
2. deploy `temporal-k8s` in a k8s model
3. integrate the two

the steps above are my current deployment, but it's possible to reproduce this issue with any application that sets `extra-user-roles` to `admin` in the relation.

## Expected behavior

The application gets credentials with the `ADMIN` role from the postgresql service.

## Actual behavior

postgresql application enters a `blocked` state with the status `invalid role(s) for extra user roles`.

## Versions

Operating system: Ubuntu 24.04.2 LTS

Juju CLI: 3.6.8-genericlinux-amd64

Juju agent: 3.6.5

Charm revision: 16/stable (843)

LXD: 5.21.3 LTS

## Additional context

PG 16 charm replaced the `admin` role with `charmed_admin`. This is a breaking change, as there's no backward compatibility with existing charms that request the former.

Contributor guide

Open the contributing guide

Research direction

Start by tracing how the PostgreSQL 16 charm validates the relation's extra-user-roles value and maps the legacy admin role to charmed_admin. Reproduce the integration with temporal-k8s or another application requesting admin; done means the application receives the expected ADMIN credentials without the postgresql application entering a blocked state.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, python
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.