Skip to content

Commit

Permalink
Merge pull request #1944 from neondatabase/dprice-stats-lost-on-suspend
Browse files Browse the repository at this point in the history
docs: add note about stats retention
  • Loading branch information
danieltprice authored Jul 19, 2024
2 parents 0b0ac97 + 8dfd267 commit 5034084
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions content/docs/extensions/pg_stat_statements.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ The version of `pg_stat_statements` available on Neon depends on the version of
- Postgres 15 - `pg_stat_statements` 1.10
- Postgres 16 - `pg_stat_statements` 1.10

### Data persistence

In Neon, statistics collected by the `pg_stat_statements` extension are not retained when your Neon compute instance (where Postgres runs) is suspended or restarted. For example, if your compute instance scales down to zero due to inactivity, any existing statistics are lost. New statistics will be gathered once your compute instance restarts. For more details about the lifecycle of a Neon compute instance, see [Compute lifecycle](/docs/conceptual-guides/compute-lifecycle/). For information about configuring Neon's autosuspend behavior, see [Autosuspend](/docs/introduction/auto-suspend).

## Enable the `pg_stat_statements` extension

You can enable the extension by running the following `CREATE EXTENSION` statement in the Neon **SQL Editor** or from a client such as `psql` that is connected to Neon.
Expand Down
2 changes: 1 addition & 1 deletion content/docs/reference/compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ The Neon cloud service automatically closes idle connections after a period of i

## Statistics collection

Statistics collected by the Postgres [cumulative statistics system](https://www.postgresql.org/docs/current/monitoring-stats.html) are currently not saved when the Neon compute node is placed into an `Idle` state due to inactivity or restarted. For information about the lifecycle of a Neon compute, see [Compute lifecycle](/docs/conceptual-guides/compute-lifecycle/).
Statistics collected by the Postgres [cumulative statistics system](https://www.postgresql.org/docs/current/monitoring-stats.html) are not saved when a Neon compute (where Postgres runs) is suspended due to inactivity or restarted. For information about the lifecycle of a Neon compute, see [Compute lifecycle](/docs/conceptual-guides/compute-lifecycle/). For information about configuring Neon's autosuspend behavior, see [Autosuspend](/docs/introduction/auto-suspend).

## Database encoding

Expand Down

0 comments on commit 5034084

Please sign in to comment.