The value 'pg_availability,pg_cron,pg_stat_statements,pgaudit' for configuration 'shared_preload_libraries' is not valid.

Yusif Nasirov 5 Reputation points
2024-09-01T10:46:27.27+00:00

Hello, team!

We have Azure Database for PostgreSQL flexible server
I would like to add over AZURE portal pgaudit extension.
First of all I add here:
User's image

Then I try to add here:

User's image

Bu t I get deployment error like this : The resource write operation failed to complete successfully, because it reached terminal provisioning state 'Failed'. Click here for details

{"code":"DeploymentFailed","target":"/subscriptions/b4f87ebc-29ee-4ea9-9bde-da59d13b1731/resourceGroups/microservices_group/providers/Microsoft.Resources/deployments/PostgreSQLFlexibleServerParameters_c871b50d51f34bf199630fd76aecf","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.","details":[{"code":"ResourceDeploymentFailure","target":"/subscriptions/b4f87ebc-29ee-4ea9-9bde-da59d13b1731/resourceGroups/microservices_group/providers/Microsoft.Resources/deployments/serverParameters-0-c871b50d51f34bf199630fd76aecf3f8","message":"The resource write operation failed to complete successfully, because it reached terminal provisioning state 'Failed'."}]}

The resource write operation failed to complete successfully, because it reached terminal provisioning state 'Failed'. (Code: ResourceDeploymentFailure, Target: /subscriptions/b4f87ebc-29ee-4ea9-9bde-da59d13b1731/resourceGroups/microservices_group/providers/Microsoft.Resources/deployments/serverParameters-0-c871b50d51f34bf199630fd76aecf3f8)

The resource write operation failed to complete successfully, because it reached terminal provisioning state 'Failed'. (Code: ResourceDeploymentFailure)

The value 'pg_availability,pg_cron,pg_stat_statements,pgaudit' for configuration 'shared_preload_libraries' is not valid. The allowed values are 'the ones indicated by PostgreSQL documentation'. (Code: InvalidConfigurationValue)

Error type

The value 'pg_availability,pg_cron,pg_stat_statements,pgaudit' for configuration 'shared_preload_libraries' is not valid. The allowed values are 'the ones indicated by PostgreSQL documentation'. (Code: InvalidConfigurationValue)

{
  "code": "DeploymentFailed",
  "message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.",
  "details": [
    {
      "code": "Conflict",
      "message": "{\r\n  \"status\": \"Failed\",\r\n  \"error\": {\r\n    \"code\": \"ResourceDeploymentFailure\",\r\n    \"message\": \"The resource write operation failed to complete successfully, because it reached terminal provisioning state 'Failed'.\",\r\n    \"details\": [\r\n      {\r\n        \"code\": \"InvalidConfigurationValue\",\r\n        \"message\": \"The value 'pg_availability,pg_cron,pg_stat_statements,pgaudit' for configuration 'shared_preload_libraries' is not valid. The allowed values are 'the ones indicated by PostgreSQL documentation'.\"\r\n      }\r\n    ]\r\n  }\r\n}"
    }
  ]
}
Azure Database for PostgreSQL
{count} votes

1 answer

Sort by: Most helpful
  1. bill.chung 0 Reputation points
    2024-09-06T08:14:11.8+00:00

    I encountered the same issue. My solution was to use AZ CLI to update shared_preload_libraries. The value pg_availability in the error message needs to be removed. The specific problem is that when modifying the shared_preload_libraries parameter through Azure’s web interface, it automatically adds the disallowed value pg_availability. The web interface caused this issue.

    az postgres flexible-server parameter set --resource-group <resource_group> --server-name <server_name> --name shared_preload_libraries --value pg_cron,pg_stat_statements,pgaudit

    az postgres flexible-server restart --resource-group<resource_group> --name <name>

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.