diff --git a/advocacy_docs/pg_extensions/wait_states/rel_notes/index.mdx b/advocacy_docs/pg_extensions/wait_states/rel_notes/index.mdx index de0be9fde69..0f9b5651b19 100644 --- a/advocacy_docs/pg_extensions/wait_states/rel_notes/index.mdx +++ b/advocacy_docs/pg_extensions/wait_states/rel_notes/index.mdx @@ -8,4 +8,5 @@ The EDB Wait States documentation describes the latest version of EDB Wait State | Version | Release Date | | -------------------------------- | ------------ | +| [1.3](wait_states_1.3_rel_notes) | 09 May 2024 | | [1.2](wait_states_1.2_rel_notes) | 15 Feb 2024 | diff --git a/advocacy_docs/pg_extensions/wait_states/rel_notes/wait_states_1.3_rel_notes.mdx b/advocacy_docs/pg_extensions/wait_states/rel_notes/wait_states_1.3_rel_notes.mdx new file mode 100644 index 00000000000..51acb7b955b --- /dev/null +++ b/advocacy_docs/pg_extensions/wait_states/rel_notes/wait_states_1.3_rel_notes.mdx @@ -0,0 +1,11 @@ +--- +title: Release notes for Wait States version 1.3 +navTitle: "Version 1.3" +--- +Release date: 09 May 2024 + +This release of Wait States includes: + +| Type | Description | +|-------------|---------------------------------------------------------| +| Enhancement | Added new function `edb_wait_states_directory_size()`. | \ No newline at end of file diff --git a/advocacy_docs/pg_extensions/wait_states/using.mdx b/advocacy_docs/pg_extensions/wait_states/using.mdx index 57b3a624383..9a4b34ebb77 100644 --- a/advocacy_docs/pg_extensions/wait_states/using.mdx +++ b/advocacy_docs/pg_extensions/wait_states/using.mdx @@ -137,6 +137,36 @@ wait_event | PgSleep . ``` +## `edb_wait_states_directory_size` + +This function gives the size of the `$PGDATA/edb_wait_states` directory. + +```sql +edb_wait_states_directory_size( + IN start_ts timestampz default '-inifinity'::timestampz, + IN end_ts timestampz default 'infinity'::timestampz +); +``` + +The function returns the total size of all the files in the `edb_wait_states` directory in bytes. Optionally specify the `start_ts` and `end_ts` timestamps to get the file size of all the files in the specified interval. + +!!!note +This function calculates and gives the size of all the files with prefix `ews_*` only. It ignores any other file added to the `edb_wait_states` directory manually. +!!! + +### Example + +This example shows the sample output from the `edb_wait_states_directory_size()` function: + +```sql +edb=# select edb_wait_states_directory_size(); +__OUTPUT__ + edb_wait_states_directory_size + ------------------------------ + 1712256 + (1 row) +``` + ## `edb_wait_states_queries` This function gives information about the queries sampled by the BGW. For example: