Skip to content

Cannot deploy postgres configurations without having to create arbitrary wait script #134

Description

@chriswue

Deploying a server and postgres configuration like this:


resource pgServer 'Microsoft.DBforPostgreSQL/flexibleServers@2025-08-01' = {
  name: 'somePgServerName'
  location: location
  sku: {
     ...
  }
  properties: {
    version: '17'
    ...
  }
}

resource cfgQueryCaptureMode 'Microsoft.DBforPostgreSQL/flexibleServers/configurations@2025-08-01' = {
  name: 'pg_qs.query_capture_mode'
  parent: pgServer
  properties: {
    source: 'user-override'
    value: 'ALL'
  }
}

will usually fail with

"code":"ServerIsBusy","message":"Cannot complete operation while server 'somePgServerName' is busy processing another operation. Try again later."

The "fix" is to insert a deployment script does an arbitrary wait - I found even a 1sec sleep works, so I assume the time it takes to provision the deployment script is about the time it takes for postgres to settle down.

This has been verified with Azure technical support.

Could the postgres provider please be changed to accept config changes without having to insert arbitrary wait scripts?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions