typedef struct ActionList
{
int nestingLevel; /* current transaction nesting depth */
- List *actions; /* list of ListenAction structs */
+ List *actions; /* list of ListenAction structs */
struct ActionList *upper; /* details for upper transaction levels */
} ActionList;
int nestingLevel; /* current transaction nesting depth */
List *events; /* list of Notification structs */
HTAB *hashtab; /* hash of NotificationHash structs, or NULL */
- struct NotificationList *upper; /* details for upper transaction levels */
+ struct NotificationList *upper; /* details for upper transaction levels */
} NotificationList;
#define MIN_HASHABLE_NOTIFIES 16 /* threshold to build hashtab */
{
double usage;
+ /* Advance the queue tail so we don't report a too-large result */
+ asyncQueueAdvanceTail();
+
LWLockAcquire(AsyncQueueLock, LW_SHARED);
usage = asyncQueueUsage();
LWLockRelease(AsyncQueueLock);
* those are allocated in TopTransactionContext.
*
* Note that there might be no entries at all, or no entries for the
- * current subtransaction level, either because none were ever created,
- * or because we reentered this routine due to trouble during subxact
- * abort.
+ * current subtransaction level, either because none were ever created, or
+ * because we reentered this routine due to trouble during subxact abort.
*/
while (pendingActions != NULL &&
pendingActions->nestingLevel >= my_level)
{
/*
* Everything's allocated in either TopTransactionContext or the context
- * for the subtransaction to which it corresponds. So, there's nothing
- * to do here except rest the pointers; the space will be reclaimed when
- * the contexts are deleted.
+ * for the subtransaction to which it corresponds. So, there's nothing to
+ * do here except reset the pointers; the space will be reclaimed when the
+ * contexts are deleted.
*/
pendingActions = NULL;
pendingNotifies = NULL;
{ oid => '3296',
descr => 'get the fraction of the asynchronous notification queue currently in use',
proname => 'pg_notification_queue_usage', provolatile => 'v',
- prorettype => 'float8', proargtypes => '',
+ proparallel => 'r', prorettype => 'float8', proargtypes => '',
prosrc => 'pg_notification_queue_usage' },
# non-persistent series generator
proargtypes => 'jsonb jsonpath jsonb bool', prosrc => 'jsonb_path_match' },
{ oid => '1177', descr => 'jsonpath exists test with timezone',
- proname => 'jsonb_path_exists_tz', provolatile => 's',
- prorettype => 'bool', proargtypes => 'jsonb jsonpath jsonb bool',
+ proname => 'jsonb_path_exists_tz', provolatile => 's', prorettype => 'bool',
+ proargtypes => 'jsonb jsonpath jsonb bool',
prosrc => 'jsonb_path_exists_tz' },
{ oid => '1179', descr => 'jsonpath query with timezone',
- proname => 'jsonb_path_query_tz', provolatile => 's',
- prorows => '1000', proretset => 't',
- prorettype => 'jsonb', proargtypes => 'jsonb jsonpath jsonb bool',
- prosrc => 'jsonb_path_query_tz' },
+ proname => 'jsonb_path_query_tz', prorows => '1000', proretset => 't',
+ provolatile => 's', prorettype => 'jsonb',
+ proargtypes => 'jsonb jsonpath jsonb bool', prosrc => 'jsonb_path_query_tz' },
{ oid => '1180', descr => 'jsonpath query wrapped into array with timezone',
proname => 'jsonb_path_query_array_tz', provolatile => 's',
prorettype => 'jsonb', proargtypes => 'jsonb jsonpath jsonb bool',
prorettype => 'jsonb', proargtypes => 'jsonb jsonpath jsonb bool',
prosrc => 'jsonb_path_query_first_tz' },
{ oid => '2030', descr => 'jsonpath match with timezone',
- proname => 'jsonb_path_match_tz', provolatile => 's',
- prorettype => 'bool', proargtypes => 'jsonb jsonpath jsonb bool',
- prosrc => 'jsonb_path_match_tz' },
+ proname => 'jsonb_path_match_tz', provolatile => 's', prorettype => 'bool',
+ proargtypes => 'jsonb jsonpath jsonb bool', prosrc => 'jsonb_path_match_tz' },
{ oid => '4010', descr => 'implementation of @? operator',
proname => 'jsonb_path_exists_opr', prorettype => 'bool',