AnalyticDB for PostgreSQL bills pay-as-you-go instances by the second — charges accrue while an instance is running, and stop when it is paused or starting after a resume. This model has been in effect since August 2, 2022.
Applicable resources
Per-second billing applies to the following resources:
| Mode | Resource |
|---|---|
| Elastic storage mode | Computing resources |
| Elastic storage mode | Storage resources |
| Serverless mode | Computing resources |
Settlement period
Each settlement period starts and ends on the hour. A bill is generated at the end of each settlement period. For details, see Bills.
Example: An instance is created at 10:59:30 and released at 12:50:30.
| Settlement period | Duration billed | Notes |
|---|---|---|
| 10:00:00–11:00:00 | 30 seconds | Billing starts at the moment of creation |
| 11:00:00–12:00:00 | 3,600 seconds | Instance runs for the full period |
| 12:00:00–13:00:00 | 3,030 seconds | Billing stops at the moment of release |
Billing during instance operations
Specification changes
When you change instance specifications, the instance passes through three states: Running → Scaling → Running.
| State | Specifications used for billing |
|---|---|
| Running (before change) | Original specifications |
| Scaling | Original specifications |
| Running (after change) | New specifications |
Example: A specification change completes at 11:30:00 during the 11:00:00–12:00:00 settlement period.
11:00:00–11:30:00: billed at original specifications
11:30:00–12:00:00: billed at new specifications
Pause and resume
When you pause and resume an instance, it passes through five states: Running → Pausing → Paused → Starting → Running.
| State | Charges |
|---|---|
| Running | Billed |
| Pausing | Billed |
| Paused | No charges |
| Starting | No charges |
| Running (after resume) | Billed |
Example: An instance reaches Paused state at 11:20:00, then reaches Running state again at 11:40:00.
11:00:00–11:20:00: billed at current specifications
11:20:00–11:40:00: no charges (instance is Paused or Starting)
11:40:00–12:00:00: billed at current specifications