microsoft / microsoft/aspire

PostgreSql Unable to change ownership of database or tables

Open
#9,478 8 comments 1 reaction 0 assignees View on GitHub
‼️regression-from-last-release area-integrations azure postgres
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Describe the bug

When transitioning from Aspire v9.1 to above, instead of having a single managed identity across all services, there are now separate managed identities per service.

My application uses MartenDb to perform event sourcing. This requires the logged in user to be the owner of the tables so that can make necessary changes.

My PostgreSQL Flexible server instance already has databases and tables that were created using the old managed identity. I have been unsuccessful in finding any way to change the ownership of the objects to the new managed identity.

### Expected Behavior

When the provisioning is done, there is a special superuser account azuresu which only MS can use. I am not sure if this is used to configure the PostgreSql instance. There needs to be some mechanism by which the ownership of objects can be changed.

### Steps To Reproduce

No repro - try to change the ownership of database or table in Azure PostgreSql instance without using superuser.

### Exceptions (if any)

_No response_

### .NET Version info

_No response_

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.