diff options
| author | Robert Haas | 2015-07-17 13:12:03 +0000 |
|---|---|---|
| committer | Robert Haas | 2015-07-17 13:12:03 +0000 |
| commit | a04bb65f70dafdf462e0478ad19e6de56df89bfc (patch) | |
| tree | f2095d72b0851f23d12ab03dc9f243c50dcd889a /src/test/regress | |
| parent | 43d89a23d59c487bc9258fad7a6187864cb8c0c0 (diff) | |
Add new function pg_notification_queue_usage.
This tells you what fraction of NOTIFY's queue is currently filled.
Brendan Jurd, reviewed by Merlin Moncure and Gurjeet Singh. A few
further tweaks by me.
Diffstat (limited to 'src/test/regress')
| -rw-r--r-- | src/test/regress/expected/async.out | 8 | ||||
| -rw-r--r-- | src/test/regress/sql/async.sql | 4 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/test/regress/expected/async.out b/src/test/regress/expected/async.out index ae0d5df3b78..19cbe38e636 100644 --- a/src/test/regress/expected/async.out +++ b/src/test/regress/expected/async.out @@ -32,3 +32,11 @@ NOTIFY notify_async2; LISTEN notify_async2; UNLISTEN notify_async2; UNLISTEN *; +-- Should return zero while there are no pending notifications. +-- src/test/isolation/specs/async-notify.spec tests for actual usage. +SELECT pg_notification_queue_usage(); + pg_notification_queue_usage +----------------------------- + 0 +(1 row) + diff --git a/src/test/regress/sql/async.sql b/src/test/regress/sql/async.sql index af3a904e0f5..40f6e015387 100644 --- a/src/test/regress/sql/async.sql +++ b/src/test/regress/sql/async.sql @@ -17,3 +17,7 @@ NOTIFY notify_async2; LISTEN notify_async2; UNLISTEN notify_async2; UNLISTEN *; + +-- Should return zero while there are no pending notifications. +-- src/test/isolation/specs/async-notify.spec tests for actual usage. +SELECT pg_notification_queue_usage(); |
