Skip to content

Latest commit

 

History

History
50 lines (44 loc) · 3.59 KB

howto-configure-server-parameters-using-cli.md

File metadata and controls

50 lines (44 loc) · 3.59 KB
title description services author ms.author manager editor ms.service ms.devlang ms.topic ms.date
Configure the service parameters in Azure Database for PostgreSQL | Microsoft Docs
This article describes how to configure the service parameters in Azure Database for PostgreSQL using the Azure CLI command line.
postgresql
SaloniSonpal
salonis
jhubbard
jasonwhowell
postgresql
azure-cli
article
10/05/2017

Customize server configuration parameters using Azure CLI

You can list, show, and update configuration parameters for an Azure PostgreSQL server using the Command Line Interface (Azure CLI). A subset of engine configurations is exposed at server-level and can be modified.

Prerequisites

To step through this how-to guide, you need:

List server configuration parameters for Azure Database for PostgreSQL server

To list all modifiable parameters in a server and their values, run the az postgres server configuration list command.

You can list the server configuration parameters for the server mypgserver-20170401.postgres.database.azure.com under resource group myresourcegroup.

az postgres server configuration list --resource-group myresourcegroup --server mypgserver-20170401

Show server configuration parameter details

To show details about a particular configuration parameter for a server, run the az postgres server configuration show command.

This example shows details of the log_min_messages server configuration parameter for server mypgserver-20170401.postgres.database.azure.com under resource group myresourcegroup.

az postgres server configuration show --name log_min_messages --resource-group myresourcegroup --server mypgserver-20170401

Modify server configuration parameter value

You can also modify the value of a certain server configuration parameter, which updates the underlying configuration value for the PostgreSQL server engine. To update the configuration, use the az postgres server configuration set command.

To update the log_min_messages server configuration parameter of server mypgserver-20170401.postgres.database.azure.com under resource group myresourcegroup.

az postgres server configuration set --name log_min_messages --resource-group myresourcegroup --server mypgserver-20170401 --value INFO

If you want to reset the value of a configuration parameter, you simply choose to leave out the optional --value parameter, and the service applies the default value. In above example, it would look like:

az postgres server configuration set --name log_min_messages --resource-group myresourcegroup --server mypgserver-20170401

This command resets the log_min_messages configuration to the default value WARNING. For more information on server configuration and permissible values, see PostgreSQL documentation on Server Configuration.

Next steps