Menu
Amazon Relational Database Service
User Guide (API Version 2014-10-31)

Modifying a DB Instance Running the PostgreSQL Database Engine

You can change the settings of a DB instance to accomplish tasks such as adding additional storage or changing the DB instance class. This topic guides you through modifying an Amazon RDS PostgreSQL DB instance, and describes the settings for PostgreSQL instances. For information about additional tasks, such as renaming, rebooting, deleting, tagging, or upgrading an Amazon RDS DB instance, see Amazon RDS DB Instance Lifecycle. We recommend that you test any changes on a test instance before modifying a production instance so you better understand the impact of a change. This is especially important when upgrading database versions.

You can have the changes apply immediately or have them applied during the DB instance's next maintenance window. Applying changes immediately can cause an outage in some cases; for more information on the impact of the Apply Immediately option when modifying a DB instance, see Modifying an Amazon RDS DB Instance and Using the Apply Immediately Parameter.

AWS Management Console

To modify a PostgreSQL DB instance

  1. Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/.

  2. In the navigation pane, click Instances.

  3. Select the check box for the DB instance that you want to change, and then click Modify.

  4. In the Modify DB Instance dialog box, change any of the settings that you want. For more information about each setting see Settings for PostgreSQL DB Instances

  5. To apply the changes immediately, select the Apply Immediately check box. Selecting this option can cause an outage in some cases; for more information on the impact of the Apply Immediately option, see Modifying an Amazon RDS DB Instance and Using the Apply Immediately Parameter.

  6. When all the changes are as you want them, click Continue. If you want to cancel any changes, click the X in the upper right corner of the page.

  7. Confirm that the changes you want are listed in the summary screen, and then click Modify DB Instance.

CLI

To modify a PostgreSQL DB instance, use the AWS CLI command modify-db-instance.

The following code modifies pgdbinstance by setting the backup retention period to 1 week (7 days) and disabling automatic minor version upgrades. These changes are applied during the next maintenance window.

Parameters

  • --db-instance-identifier—the name of the db instance

  • --backup-retention-period—the number of days to retain automatic backups.

  • --no-auto-minor-version-upgrade—disallow automatic minor version upgrades. To allow automatic minor version upgrades, use --auto-minor-version-upgrade.

  • --no-apply-immediately—apply changes during the next maintenance window. To apply changes immediately, use --apply-immediately.

For Linux, OS X, or Unix:

Copy
aws rds modify-db-instance \ --db-instance-identifier pgdbinstance \ --backup-retention-period 7 \ --no-auto-minor-version-upgrade \ --no-apply-immediately

For Windows:

Copy
aws rds modify-db-instance ^ --db-instance-identifier pgdbinstance ^ --backup-retention-period 7 ^ --no-auto-minor-version-upgrade ^ --no-apply-immediately

API

To modify a PostgreSQL DB instance, use the ModifyDBInstance action.

Example

The following code modifies pgdbinstance by setting the backup retention period to 1 week (7 days) and disabling automatic minor version upgrades. These changes are applied during the next maintenance window.

Parameters

  • DBInstanceIdentifier—the name of the db instance

  • BackupRetentionPeriod—the number of days to retain automatic backups.

  • AutoMinorVersionUpgrade=false—disallow automatic minor version upgrades. To allow automatic minor version upgrades, set the value to true.

  • ApplyImmediately=false—apply changes during the next maintenance window. To apply changes immediately, set the value to true.

Copy
https://rds.us-east-1.amazonaws.com/ ?Action=ModifyDBInstance &ApplyImmediately=false &AutoMinorVersionUpgrade=false &BackupRetentionPeriod=7 &DBInstanceIdentifier=mydbinstance &SignatureMethod=HmacSHA256 &SignatureVersion=4 &Version=2013-09-09 &X-Amz-Algorithm=AWS4-HMAC-SHA256 &X-Amz-Credential=AKIADQKE4SARGYLE/20131016/us-east-1/rds/aws4_request &X-Amz-Date=20131016T233051Z &X-Amz-SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date &X-Amz-Signature=087a8eb41cb1ab0fc9ec1575f23e73757ffc6a1e42d7d2b30b9cc0be988cff97

Settings for PostgreSQL DB Instances

The following table contains details about which settings you can modify, which settings you can't modify, when the changes can be applied, and whether the changes cause downtime for the DB instance.

Setting Setting Description When the Change Occurs Downtime Notes

Allocated Storage

The storage, in gigabytes, that you want to allocate for your DB instance. The minimum storage allowed is 20 GB; the maximum storage allowed is 6 TB.

You can only increase the allocated storage, you can't reduce the allocated storage.

For more information, see Storage for Amazon RDS.

If Apply Immediately is set to true, the change occurs immediately.

If Apply Immediately is set to false, the change occurs during the next maintenance window.

No downtime. Performance may be degraded during the change.

Auto Minor Version Upgrade

If you want your DB instance to receive minor engine version upgrades automatically when they become available, click Yes. Upgrades are installed only during your scheduled maintenance window.

Backup Retention Period

The number of days that automatic backups are retained. To disable automatic backups, set the backup retention period to 0.

For more information, see Working With Backups.

If Apply Immediately is set to true, the change occurs immediately.

If Apply Immediately is set to false and you change the setting from a non-zero value to another non-zero value, the change is applied asynchronously, as soon as possible. Otherwise, the change occurs during the next maintenance window.

An outage occurs if you change from 0 to a non-zero value, or from a non-zero value to 0.

Backup Window

The time range during which automated backups of your databases occur. The backup window is a start time in Universal Coordinated Time (UTC), and a duration in hours.

For more information, see Working With Backups.

The change is applied asynchronously, as soon as possible.

Certificate Authority

The certificate that you want to use.

Copy Tags to Snapshots

If you have any DB instance tags, this option copies them when you create a DB snapshot.

For more information, see Tagging Amazon RDS Resources.

Database Port

The port that you want to use to access the database.

The port value must not match any of the port values specified for options in the option group for the DB instance.

The change occurs immediately. This setting ignores the Apply Immediately setting.

The DB instance is rebooted immediately.

DB Engine Version

The version of the PostgreSQL database engine that you want to use. Before you upgrade your production DB instances, we recommend that you test the upgrade process on a test instance to verify its duration and to validate your applications.

If Apply Immediately is set to true, the change occurs immediately.

If Apply Immediately is set to false, the change occurs during the next maintenance window.

An outage occurs during this change.

DB Instance Class

The DB instance class that you want to use.

For more information, see DB Instance Class

If Apply Immediately is set to true, the change occurs immediately.

If Apply Immediately is set to false, the change occurs during the next maintenance window.

An outage occurs during this change.

DB Instance Identifier

The DB instance identifier. This value is stored as a lowercase string.

For more information about the effects of renaming a DB instance, see Renaming a DB Instance.

If Apply Immediately is set to true, the change occurs immediately.

If Apply Immediately is set to false, the change occurs during the next maintenance window.

An outage occurs during this change. The DB instance is rebooted.

DB Parameter Group

The parameter group that you want associated with the DB instance.

For more information, see Working with DB Parameter Groups.

The parameter group change occurs immediately. However, parameter changes only occur when you reboot the DB instance manually without failover.

For more information, see Rebooting a DB Instance.

An outage doesn't occur during this change. However, parameter changes only occur when you reboot the DB instance manually without failover.

Enable Enhanced Monitoring

Yes to enable gathering metrics in real time for the operating system that your DB instance runs on.

For more information, see Enhanced Monitoring.

License Model

Select the PostgreSQL License.

If Apply Immediately is set to true, the change occurs immediately.

If Apply Immediately is set to false, the change occurs during the next maintenance window.

An outage occurs during this change.

Maintenance Window

The time range during which system maintenance occurs. System maintenance includes upgrades, if applicable. The maintenance window is a start time in Universal Coordinated Time (UTC), and a duration in hours.

If you set the window to the current time, there must be at least 30 minutes between the current time and end of the window to ensure any pending changes are applied.

For more information, see Amazon RDS Maintenance Window.

The change occurs immediately. This setting ignores the Apply Immediately setting.

If there are one or more pending actions that cause an outage, and the maintenance window is changed to include the current time, then those pending actions are applied immediately, and an outage occurs.

Multi-AZ Deployment

Yes to deploy your DB instance in multiple Availability Zones; otherwise, No.

For more information, see Regions and Availability Zones.

If Apply Immediately is set to true, the change occurs immediately.

If Apply Immediately is set to false, the change occurs during the next maintenance window.

New Master Password

The password for your master user. The password must contain from 8 to 30 alphanumeric characters.

The change is applied asynchronously, as soon as possible. This setting ignores the Apply Immediately setting.

Option Group

No options are available for PostgreSQL DB instances.

For more information, see Working with Option Groups.

Publicly Accessible

Yes to give the DB instance a public IP address, meaning that it is accessible outside the VPC. To be publicly accessible, the DB instance also has to be in a public subnet in the VPC. No to make the DB instance accessible only from inside the VPC.

For more information, see Hiding a DB Instance in a VPC from the Internet.

The change occurs immediately. This setting ignores the Apply Immediately setting.

Security Group

The security group you want associated with the DB instance.

For more information, see Working with DB Security Groups (EC2-Classic Platform).

The change is applied asynchronously, as soon as possible. This setting ignores the Apply Immediately setting.

Storage Type

The storage type that you want to use.

For more information, see Amazon RDS Storage Types.

If Apply Immediately is set to true, the change occurs immediately.

If Apply Immediately is set to false, the change occurs during the next maintenance window.

The following changes all result in a brief outage while the process starts. After that, you can use your database normally while the change takes place.

  • From General Purpose (SSD) to Magnetic.

  • From General Purpose (SSD) to Provisioned IOPS (SSD), if you are using a custom parameter group.

  • From Magnetic to General Purpose (SSD).

  • From Magnetic to Provisioned IOPS (SSD).

  • From Provisioned IOPS (SSD) to Magnetic.

  • From Provisioned IOPS (SSD) to General Purpose (SSD), if you are using a custom parameter group.

Subnet Group

The subnet group for the DB instance. You can use this setting to move your DB instance to a different VPC. If your DB instance is not in a VPC, you can use this setting to move your DB instance into a VPC.

For more information, see Moving a DB Instance Not in a VPC into a VPC.