Skip to content

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

@chriswue

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?

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