Skip to content

Commit

Permalink
Merge pull request #5513 from EnterpriseDB/content/docs/ext/edb_wait_…
Browse files Browse the repository at this point in the history
…states

edb_wait_states - Added 1.3 release notes and new function
  • Loading branch information
nidhibhammar authored May 15, 2024
2 parents 6f07d84 + 0b6bbdf commit 3e1353f
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Original file line number Diff line number Diff line change
@@ -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()`. |
30 changes: 30 additions & 0 deletions advocacy_docs/pg_extensions/wait_states/using.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

1 comment on commit 3e1353f

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.