Snowflake Postgres instance management

Snowflake Postgres helps you manage your instances through a variety of instance management operations. These operations are forms of maintenance that keep your instances operational and secure.

A brief service interruption is required to perform instance management operations. Please ensure that your applications are able to automatically reconnect to the database.

Note

An instance’s connection string will remain the same across instance management operations unless you explicitly rotate the credentials.

When required to ensure the health of your instance, we may schedule maintenance operations on your behalf (for example, to modify instance storage size).

For a detailed description of how instance maintenance is carried out by our platform, see Snowflake Postgres Maintenance.

Available operations

The following operations are available from the Manage dropdown menu on your instance details page in the dashboard:

Fork

You can fork an instance to create a new instance from an existing instance, optionally choosng a point in time to fork from. By default the new instance will be forked from the current state of the source instance. Read more about forking in Snowflake Postgres point-in-time recovery.

Modify

To make a change to an existing Snowflake Postgres instance, you must use a role that has been granted the OWNERSHIP or OPERATE privilege on that instance.

You can resize an instance in-place with minimal impact and no changes to your connection string. During an instance resize, you can:

  • Change the COMPUTE_FAMILY to a different size.

  • Change the amount of storage. Both increases and decreases in storage size are supported.

  • Upgrade the Postgres version to a newer major version.

Modifying your instance’s configuration requires maintenance. See Snowflake Postgres Maintenance for more information.

To make a change:

  1. In the navigation menu, select Postgres.

  2. Select your instance.

  3. In the Manage menu at the top right, select Modify.

  4. Select the new COMPUTE_FAMILY and/or storage size from the dropdown menus. See Postgres major version upgrades for more information about changing the Postgres version.

  5. Select the Save button to confirm the changes.

Modify a Snowflake Postgres instance

If you plan to decrease the storage size of your instance, please note that we currently allow the resize to be greater than or equal to 1.4x the current disk usage to reduce alerting and immediate resizing up.

Postgres major version upgrades

Snowflake Postgres allows you to schedule your major version upgrades through the Dashboard. To make this change you’ll use the same process as for an instance resize. Upgrading your instance to a new major version requires maintenance. See Snowflake Postgres Maintenance for general information about maintenance, and below for more specific information about major version upgrades.

To initiate a major version upgrade, you must use a role that has been granted the OWNERSHIP or OPERATE privilege on the instance.

Note

You can only upgrade to a newer major version - you cannot downgrade to a previous major version.

Note

You can combine a major version upgrade with an instance resize by selecting a new instance size and/or storage size at the same time.

  1. In the navigation menu, select Postgres.

  2. Select your Snowflake Postgres instance.

  3. In the Manage menu at the top right, select Modify.

  4. If a newer version is available, you will be able to select it from the Postgres version dropdown menu.

  5. Select the Save button to confirm the change.

Modify a Snowflake Postgres instance with a major version upgrade

Postgres major version upgrades work differently than other instance management operations. Once you initiate the process, Snowflake Postgres will execute the following steps:

  1. Create a “hidden” (not visible to users) replica of your current instance.

  2. Migrate existing data from the source instance to the hidden replica (duration is relative to data size).

  3. When your maintenance window arrives:

    • Lock the source instance to prevent writes.

    • Upgrade the hidden replica (duration depends on the number of objects in your database, not data size).

  4. Fail over to the newly upgraded instance once the upgrade is complete.

Important Notes:

  • Major Version changes can affect application compatibility. We recommend testing your application against the new PostgreSQL version before upgrading.

  • Read Replicas are automatically upgraded when performing a major version upgrade, but only once its primary is upgraded and a fresh backup is taken. Until then, replicas will remain available but in a stale state.

  • If you have no maintenance window set, and have not specified a run time, the upgrade will commence as soon as the new instance is populated and ready.

  • This operation creates a service interruption that should last no longer than a few minutes.

  • If an upgrade fails, your instance will automatically revert back to the original instance.

Enable High Availability

When High Availability (HA) is enabled your instance includes a standby host which will replace the primary in the event your primary becomes unavailable. You can read more about this in Snowflake Postgres High Availability.

Create replica

You can create a replica of your instance from the dashboard. A replica is a read-only copy of the source instance that is kept in sync with the source instance. Find about more about creating and using replicas in Snowflake Postgres Read Replicas.

Instance suspend and resume

Suspending an instance deactivates the virtual machine that it’s running on while keeping its disk image in storage so that the instance can be resumed. Normal billing for the instance is suspended, but storage costs will continue to accrue. The existing 10 days’ worth of backups are also retained.

If there were operations that were pending restart to be applied, they will be applied when the instance is resumed.

To suspend or resume a Snowflake Postgres instance, you must use a role that has been granted the OWNERSHIP or OPERATE privilege on the instance.

Snowflake Postgres allows you to suspend your instance from the dashboard.

  1. In the navigation menu, select Postgres.

  2. Select your instance.

  3. In the Manage menu at the top right, select Suspend.

  4. Click the Suspend button to confirm the action.

Suspend a Snowflake Postgres instance

To suspend a Snowflake Postgres instance, run ALTER POSTGRES INSTANCE … SUSPEND:

ALTER POSTGRES INSTANCE [ IF EXISTS ] <name> SUSPEND
Copy
  • These operations are asynchronous. The DESCRIBE command may be used to track the status of these operations.

Example: Suspend a Snowflake Postgres instance named my_instance

ALTER POSTGRES INSTANCE my_instance SUSPEND;
Copy

You can resume a suspended instance at any time. The time it takes to resume an instance depends on the instance and the size of the dataset. When you resume an instance, normal billing and backups will also recommence.

  1. In the navigation menu, select Postgres.

  2. Select your instance.

  3. In the Manage menu at the top right, select Resume.

  4. Click the Resume button to confirm the action.

Resume a Snowflake Postgres instance

To resume a Snowflake Postgres instance, run ALTER POSTGRES INSTANCE … RESUME:

ALTER POSTGRES INSTANCE [ IF EXISTS ] <name> RESUME
Copy

These operations are asynchronous. The DESCRIBE command may be used to track the status of these operations.

Example: Resume a Snowflake Postgres instance named my_instance

ALTER POSTGRES INSTANCE my_instance RESUME;
Copy

Restarting services

You can restart either PostgreSQL or the underlying server that runs your Postgres instance if needed. This type of instance management operation restarts the server in-place, without creating a replica or performing a fail-over. Read more about restarting services in Snowflake Postgres Maintenance.

Regenerate credentials

Regenerating credentials will return a new connection string for your database instance, replacing the existing credentials. Read more about this topic in Snowflake Postgres Roles.

Custom configuration parameters

You can make changes to many of Postgres’s own server settings for your Snowflake Postgres instances. You can see the list of available configuration parameters in Snowflake Postgres Server Settings.

To change the Postgres settings on a Snowflake Postgres instance, you must use a role that has been granted the OWNERSHIP or OPERATE privilege on that instance.

To make a change:

  1. In the navigation menu, select Postgres

  2. Select your instance

  3. On the right side of the page select the edit icon next to Custom parameters

  4. Choose configuration parameters from the list, or use the search box to find specific parameters.

  5. Enter the new value for the configuration parameter.

  6. When you’ve finished add new values for parameters, click Continue to review, and then click Submit to confirm the changes.

Example: changing the `max_connections` configuration parameter for a Snowflake Postgres instance

Instance states

Any instance management operation, whether it’s creating a new instance or modifying an existing one, takes some time to complete. The exact duration depends on many factors, including your data and schema sizes, and how busy your instance is. An instance’s state gives you insight into the progress of an ongoing operation. It is shown in the dashboard, or you can check it by running the DESCRIBE POSTGRES INSTANCE command.

Possible instance states are listed below. During an instance modification operation, the replacement instance goes through all of the states listed in the first table. A new instance being created goes through some but not all of the states listed. The following table lists some additional states you may see during normal operations.

States seen during create, modify, and fork:

State

What’s happening

Typical duration

Next state

Creating

A new underlying server is being created

1-2 minutes

Restoring

Restoring

Latest base backup is being restored to the server

Variable

Starting

Starting

Postgres is being started on the instance and WAL that accumulated during base backup is being applied

Variable

Replaying

Replaying

Accumulated WAL since last base backup is being replayed

Variable

Finalizing

Finalizing

Instance configuration is being finalized and the server is being made available

1-2 minutes

Ready

Ready

New instance matches source instance and is ready for the operation to proceed. If scheduled for an upcoming maintenance window, instance is kept Ready until that time. If scheduled for now, the operation proceeds once it reaches Ready. Running instances normally show the Ready state.

N/A

N/A

Other instance states you may see on the platform:

State

What’s happening

Typical duration

Next state

Restarting

Underlying server is being restarted

1-2 minutes

Ready

Resuming

A new server is being built and a suspended instance is being resumed

3-5 minutes

Ready

Suspending

Instance is being suspended

3-5 minutes

Suspended

Suspended

Instance is currently suspended

Until resumed

Resuming

Language: English