|
PostgreSQL Source Code git master
|
#include "postgres.h"#include <limits.h>#include <unistd.h>#include <signal.h>#include "access/parallel.h"#include "access/slru.h"#include "access/transam.h"#include "access/xact.h"#include "catalog/pg_database.h"#include "commands/async.h"#include "common/hashfn.h"#include "funcapi.h"#include "lib/dshash.h"#include "libpq/libpq.h"#include "libpq/pqformat.h"#include "miscadmin.h"#include "storage/dsm_registry.h"#include "storage/ipc.h"#include "storage/latch.h"#include "storage/lmgr.h"#include "storage/procsignal.h"#include "storage/subsystems.h"#include "tcop/tcopprot.h"#include "utils/builtins.h"#include "utils/dsa.h"#include "utils/guc_hooks.h"#include "utils/memutils.h"#include "utils/ps_status.h"#include "utils/snapmgr.h"#include "utils/timestamp.h"
Go to the source code of this file.
Data Structures | |
| struct | AsyncQueueEntry |
| struct | QueuePosition |
| struct | QueueBackendStatus |
| struct | AsyncQueueControl |
| struct | GlobalChannelKey |
| struct | ListenerEntry |
| struct | GlobalChannelEntry |
| struct | ListenAction |
| struct | ActionList |
| struct | PendingListenEntry |
| struct | Notification |
| struct | NotificationList |
| struct | NotificationHash |
| struct | ChannelName |
Typedefs | |
| typedef struct AsyncQueueEntry | AsyncQueueEntry |
| typedef struct QueuePosition | QueuePosition |
| typedef struct QueueBackendStatus | QueueBackendStatus |
| typedef struct AsyncQueueControl | AsyncQueueControl |
| typedef struct GlobalChannelKey | GlobalChannelKey |
| typedef struct ListenerEntry | ListenerEntry |
| typedef struct GlobalChannelEntry | GlobalChannelEntry |
| typedef struct ActionList | ActionList |
| typedef struct PendingListenEntry | PendingListenEntry |
| typedef struct Notification | Notification |
| typedef struct NotificationList | NotificationList |
| typedef struct ChannelName | ChannelName |
Enumerations | |
| enum | ListenActionKind { LISTEN_LISTEN , LISTEN_UNLISTEN , LISTEN_UNLISTEN_ALL } |
| enum | PendingListenAction { PENDING_LISTEN , PENDING_UNLISTEN } |
| #define AsyncQueueEntryEmptySize (offsetof(AsyncQueueEntry, data) + 2) |
| #define LocalChannelTableIsEmpty | ( | ) | (localChannelTable == NULL || hash_get_num_entries(localChannelTable) == 0) |
Definition at line 425 of file async.c.
| #define NOTIFY_PAYLOAD_MAX_LENGTH (BLCKSZ - NAMEDATALEN - 128) |
| #define NotifyCtl (&NotifySlruDesc) |
| #define QUEUE_BACKEND_DBOID | ( | i | ) | (asyncQueueControl->backend[i].dboid) |
| #define QUEUE_BACKEND_IS_ADVANCING | ( | i | ) | (asyncQueueControl->backend[i].isAdvancing) |
| #define QUEUE_BACKEND_PID | ( | i | ) | (asyncQueueControl->backend[i].pid) |
| #define QUEUE_BACKEND_POS | ( | i | ) | (asyncQueueControl->backend[i].pos) |
| #define QUEUE_BACKEND_WAKEUP_PENDING | ( | i | ) | (asyncQueueControl->backend[i].wakeupPending) |
| #define QUEUE_FIRST_LISTENER (asyncQueueControl->firstListener) |
| #define QUEUE_HEAD (asyncQueueControl->head) |
| #define QUEUE_NEXT_LISTENER | ( | i | ) | (asyncQueueControl->backend[i].nextListener) |
| #define QUEUE_STOP_PAGE (asyncQueueControl->stopPage) |
| #define QUEUE_TAIL (asyncQueueControl->tail) |
| typedef struct ActionList ActionList |
| typedef struct ChannelName ChannelName |
| typedef struct ListenerEntry ListenerEntry |
| typedef struct Notification Notification |
| typedef struct QueuePosition QueuePosition |
|
static |
Definition at line 3162 of file async.c.
References Assert, CurTransactionContext, Notification::data, NotificationList::events, fb(), HASH_COMPARE, HASH_CONTEXT, hash_create(), HASH_ELEM, HASH_ENTER, HASH_FUNCTION, hash_search(), HASH_STRINGS, NotificationList::hashtab, lappend(), lfirst, list_length(), MIN_HASHABLE_NOTIFIES, NAMEDATALEN, NIL, notification_hash(), notification_match(), pendingNotifies, and NotificationList::uniqueChannelHash.
Referenced by Async_Notify(), and AtSubCommit_Notify().
Definition at line 1721 of file async.c.
References PendingListenEntry::action, PendingListenEntry::channel, dsa_get_address(), dshash_find(), dshash_release_lock(), elog, fb(), globalChannelDSA, GlobalChannelKeyInit(), globalChannelTable, HASH_REMOVE, hash_search(), hash_seq_init(), hash_seq_search(), i, GlobalChannelEntry::listenersArray, ListenerEntry::listening, localChannelTable, MyDatabaseId, MyProcNumber, GlobalChannelEntry::numListeners, PANIC, PENDING_LISTEN, pendingListenActions, and RemoveListenerFromChannel().
Referenced by AtAbort_Notify(), and AtCommit_Notify().
Definition at line 1043 of file async.c.
References DEBUG1, elog, LISTEN_LISTEN, MyProcPid, queue_listen(), and Trace_notify.
Referenced by standard_ProcessUtility().
Definition at line 894 of file async.c.
References AddEventToPendingNotifies(), AsyncExistsPendingNotify(), Notification::channel_len, CurTransactionContext, Notification::data, data, DEBUG1, elog, ereport, errcode(), errmsg, ERROR, fb(), GetCurrentTransactionNestLevel(), IsParallelWorker, list_make1, MemoryContextAlloc(), MemoryContextSwitchTo(), NAMEDATALEN, NotificationList::nestingLevel, NIL, NOTIFY_PAYLOAD_MAX_LENGTH, palloc(), Notification::payload_len, pendingNotifies, pfree(), TopTransactionContext, and Trace_notify.
Referenced by pg_notify(), standard_ProcessUtility(), and triggered_change_notification().
Definition at line 1057 of file async.c.
References DEBUG1, elog, fb(), LISTEN_UNLISTEN, MyProcPid, pendingActions, queue_listen(), Trace_notify, and unlistenExitRegistered.
Referenced by standard_ProcessUtility().
Definition at line 1075 of file async.c.
References DEBUG1, elog, fb(), LISTEN_UNLISTEN_ALL, MyProcPid, pendingActions, queue_listen(), Trace_notify, and unlistenExitRegistered.
Referenced by DiscardAll(), and standard_ProcessUtility().
Definition at line 1147 of file async.c.
References asyncQueueUnregister(), and CleanupListenersOnExit().
Referenced by BecomeRegisteredListener().
|
static |
Definition at line 3121 of file async.c.
References Notification::channel_len, Notification::data, NotificationList::events, fb(), HASH_FIND, hash_search(), NotificationList::hashtab, lfirst, Notification::payload_len, and pendingNotifies.
Referenced by Async_Notify(), and AtSubCommit_Notify().
| void AsyncNotifyFreezeXids | ( | TransactionId | newFrozenXid | ) |
Definition at line 2950 of file async.c.
References asyncQueueAdvance(), fb(), FrozenTransactionId, InvalidTransactionId, LW_EXCLUSIVE, LW_SHARED, LWLockAcquire(), LWLockRelease(), NotifyCtl, QUEUE_HEAD, QUEUE_POS_EQUAL, QUEUE_POS_OFFSET, QUEUE_POS_PAGE, QUEUE_TAIL, SimpleLruGetBankLock(), SimpleLruReadPage(), TransactionIdDidCommit(), TransactionIdIsNormal, and TransactionIdPrecedes().
Referenced by vac_truncate_clog().
Definition at line 2043 of file async.c.
References asyncQueueAdvance(), asyncQueueNotificationToEntry(), NotificationList::events, fb(), InvalidOid, InvalidTransactionId, lfirst, lnext(), LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), memcpy(), NotifyCtl, pendingNotifies, QUEUE_CLEANUP_DELAY, QUEUE_HEAD, QUEUE_PAGESIZE, QUEUE_POS_IS_ZERO, QUEUE_POS_OFFSET, QUEUE_POS_PAGE, SimpleLruGetBankLock(), SimpleLruReadPage(), SimpleLruZeroPage(), and tryAdvanceTail.
Referenced by PreCommit_Notify().
|
static |
Definition at line 1974 of file async.c.
References Assert, AsyncQueueEntryEmptySize, fb(), QUEUE_PAGESIZE, QUEUE_POS_OFFSET, QUEUE_POS_PAGE, QUEUEALIGN, and SET_QUEUE_POS.
Referenced by AsyncNotifyFreezeXids(), asyncQueueAddEntries(), and asyncQueueProcessPageEntries().
Definition at line 2868 of file async.c.
References Assert, asyncQueuePagePrecedes(), fb(), i, INVALID_PROC_NUMBER, InvalidPid, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), NotifyCtl, QUEUE_BACKEND_PID, QUEUE_BACKEND_POS, QUEUE_FIRST_LISTENER, QUEUE_HEAD, QUEUE_NEXT_LISTENER, QUEUE_POS_MIN, QUEUE_POS_PAGE, QUEUE_STOP_PAGE, QUEUE_TAIL, SimpleLruTruncate(), and SLRU_PAGES_PER_SEGMENT.
Referenced by AtCommit_Notify(), and pg_notification_queue_usage().
Definition at line 627 of file async.c.
References errdetail(), fb(), QueuePosition::offset, and QueuePosition::page.
Referenced by AsyncShmemRequest().
Definition at line 2214 of file async.c.
References Assert, asyncQueueControl, asyncQueueUsage(), ereport, errdetail(), errhint(), errmsg, fb(), GetCurrentTimestamp(), i, INVALID_PROC_NUMBER, InvalidPid, AsyncQueueControl::lastQueueFillWarn, QUEUE_BACKEND_PID, QUEUE_BACKEND_POS, QUEUE_FIRST_LISTENER, QUEUE_FULL_WARN_INTERVAL, QUEUE_HEAD, QUEUE_NEXT_LISTENER, QUEUE_POS_EQUAL, QUEUE_POS_MIN, TimestampDifferenceExceeds(), and WARNING.
Referenced by PreCommit_Notify().
Definition at line 1959 of file async.c.
References fb(), max_notify_queue_pages, QUEUE_HEAD, QUEUE_POS_PAGE, and QUEUE_TAIL.
Referenced by PreCommit_Notify().
|
static |
Definition at line 2007 of file async.c.
References Assert, AsyncQueueEntryEmptySize, Notification::channel_len, Notification::data, fb(), GetCurrentTransactionId(), memcpy(), MyDatabaseId, MyProcPid, NAMEDATALEN, NOTIFY_PAYLOAD_MAX_LENGTH, Notification::payload_len, and QUEUEALIGN.
Referenced by asyncQueueAddEntries().
Definition at line 650 of file async.c.
Referenced by asyncQueueAdvanceTail(), and AsyncShmemRequest().
|
static |
Definition at line 2730 of file async.c.
References Assert, asyncQueueAdvance(), AsyncQueueEntry::data, fb(), IsListeningOn(), LocalChannelTableIsEmpty, LWLockRelease(), memcpy(), MyDatabaseId, NotifyCtl, NotifyMyFrontEnd(), QUEUE_PAGESIZE, QUEUE_POS_EQUAL, QUEUE_POS_OFFSET, QUEUE_POS_PAGE, SimpleLruGetBankLock(), SimpleLruReadPage_ReadOnly(), TransactionIdDidCommit(), and XidInMVCCSnapshot().
Referenced by asyncQueueReadAllNotifications().
Definition at line 2596 of file async.c.
References Assert, asyncQueueProcessPageEntries(), ExitOnAnyError, fb(), GetLatestSnapshot(), LW_SHARED, LWLockAcquire(), LWLockRelease(), MyProcNumber, MyProcPid, QUEUE_BACKEND_IS_ADVANCING, QUEUE_BACKEND_PID, QUEUE_BACKEND_POS, QUEUE_BACKEND_WAKEUP_PENDING, QUEUE_HEAD, QUEUE_POS_EQUAL, RegisterSnapshot(), and UnregisterSnapshot().
Referenced by BecomeRegisteredListener(), and ProcessIncomingNotify().
Definition at line 1916 of file async.c.
References amRegisteredListener, Assert, fb(), i, INVALID_PROC_NUMBER, InvalidOid, InvalidPid, LocalChannelTableIsEmpty, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), MyProcNumber, QUEUE_BACKEND_DBOID, QUEUE_BACKEND_IS_ADVANCING, QUEUE_BACKEND_PID, QUEUE_BACKEND_WAKEUP_PENDING, QUEUE_FIRST_LISTENER, and QUEUE_NEXT_LISTENER.
Referenced by Async_UnlistenOnExit(), AtAbort_Notify(), and AtCommit_Notify().
Definition at line 2193 of file async.c.
References fb(), max_notify_queue_pages, QUEUE_HEAD, QUEUE_POS_PAGE, and QUEUE_TAIL.
Referenced by asyncQueueFillWarning(), and pg_notification_queue_usage().
Definition at line 829 of file async.c.
References asyncQueueControl, DSA_HANDLE_INVALID, DSHASH_HANDLE_INVALID, fb(), AsyncQueueControl::globalChannelTableDSA, AsyncQueueControl::globalChannelTableDSH, i, INVALID_PROC_NUMBER, InvalidOid, InvalidPid, AsyncQueueControl::lastQueueFillWarn, MaxBackends, NotifyCtl, QUEUE_BACKEND_DBOID, QUEUE_BACKEND_IS_ADVANCING, QUEUE_BACKEND_PID, QUEUE_BACKEND_POS, QUEUE_BACKEND_WAKEUP_PENDING, QUEUE_FIRST_LISTENER, QUEUE_HEAD, QUEUE_NEXT_LISTENER, QUEUE_STOP_PAGE, QUEUE_TAIL, SET_QUEUE_POS, SlruScanDirCbDeleteAll(), and SlruScanDirectory().
Definition at line 798 of file async.c.
References add_size(), asyncQueueControl, asyncQueueErrdetailForIoError(), asyncQueuePagePrecedes(), fb(), MaxBackends, mul_size(), name, notify_buffers, NotifySlruDesc, ShmemRequestStruct, SimpleLruRequest, and SYNC_HANDLER_NONE.
Definition at line 2418 of file async.c.
References amRegisteredListener, ApplyPendingListenActions(), asyncQueueUnregister(), ClearPendingActionsAndNotifies(), and LocalChannelTableIsEmpty.
Referenced by AbortTransaction().
Definition at line 1378 of file async.c.
References amRegisteredListener, ApplyPendingListenActions(), asyncQueueAdvanceTail(), asyncQueueUnregister(), ClearPendingActionsAndNotifies(), DEBUG1, elog, fb(), LocalChannelTableIsEmpty, pendingActions, pendingNotifies, SignalBackends(), Trace_notify, and tryAdvanceTail.
Referenced by CommitTransaction().
Definition at line 1160 of file async.c.
References ereport, errcode(), errmsg, ERROR, fb(), pendingActions, and pendingNotifies.
Referenced by PrepareTransaction().
Definition at line 2507 of file async.c.
References fb(), GetCurrentTransactionNestLevel(), ActionList::nestingLevel, NotificationList::nestingLevel, pendingActions, pendingNotifies, pfree(), ActionList::upper, and NotificationList::upper.
Referenced by AbortSubTransaction().
Definition at line 2437 of file async.c.
References ActionList::actions, AddEventToPendingNotifies(), Assert, AsyncExistsPendingNotify(), fb(), GetCurrentTransactionNestLevel(), lfirst, list_concat(), ActionList::nestingLevel, NotificationList::nestingLevel, pendingActions, pendingNotifies, pfree(), ActionList::upper, and NotificationList::upper.
Referenced by CommitSubTransaction().
Definition at line 1430 of file async.c.
References amRegisteredListener, Async_UnlistenOnExit(), asyncQueueReadAllNotifications(), before_shmem_exit(), DEBUG1, elog, fb(), i, INVALID_PROC_NUMBER, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), MyDatabaseId, MyProcNumber, MyProcPid, QUEUE_BACKEND_DBOID, QUEUE_BACKEND_IS_ADVANCING, QUEUE_BACKEND_PID, QUEUE_BACKEND_POS, QUEUE_BACKEND_WAKEUP_PENDING, QUEUE_FIRST_LISTENER, QUEUE_HEAD, QUEUE_NEXT_LISTENER, QUEUE_POS_EQUAL, QUEUE_POS_MAX, QUEUE_TAIL, Trace_notify, and unlistenExitRegistered.
Referenced by PreCommit_Notify().
Definition at line 3294 of file async.c.
References check_slru_buffers(), and newval.
Definition at line 1846 of file async.c.
References GlobalChannelKey::dboid, DEBUG1, dsa_free(), dsa_get_address(), dshash_delete_current(), dshash_seq_init(), dshash_seq_next(), dshash_seq_term(), elog, fb(), globalChannelDSA, globalChannelTable, hash_destroy(), i, GlobalChannelEntry::key, GlobalChannelEntry::listenersArray, localChannelTable, MyDatabaseId, MyProcNumber, MyProcPid, GlobalChannelEntry::numListeners, and Trace_notify.
Referenced by Async_UnlistenOnExit().
Definition at line 3276 of file async.c.
References fb(), pendingActions, pendingListenActions, and pendingNotifies.
Referenced by AtAbort_Notify(), and AtCommit_Notify().
|
inlinestatic |
Definition at line 660 of file async.c.
References fb(), NAMEDATALEN, and strlcpy().
Referenced by ApplyPendingListenActions(), PrepareTableEntriesForListen(), and SignalBackends().
Definition at line 672 of file async.c.
References GlobalChannelKey::channel, DatumGetUInt32(), GlobalChannelKey::dboid, fb(), hash_any(), hash_uint32(), and NAMEDATALEN.
Definition at line 2550 of file async.c.
References notifyInterruptPending.
Referenced by procsignal_sigusr1_handler().
Definition at line 699 of file async.c.
References asyncQueueControl, dsa_attach(), dsa_create, dsa_get_handle(), dsa_pin(), dsa_pin_mapping(), dshash_attach(), dshash_create(), dshash_get_hash_table_handle(), DSHASH_HANDLE_INVALID, fb(), globalChannelDSA, globalChannelTable, AsyncQueueControl::globalChannelTableDSA, AsyncQueueControl::globalChannelTableDSH, globalChannelTableDSHParams, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), MemoryContextSwitchTo(), and TopMemoryContext.
Referenced by PreCommit_Notify().
Definition at line 750 of file async.c.
References fb(), hash_create(), HASH_ELEM, HASH_STRINGS, HASHCTL::keysize, localChannelTable, and NAMEDATALEN.
Referenced by PreCommit_Notify().
Definition at line 776 of file async.c.
References ActionList::actions, CurTransactionContext, fb(), HASH_CONTEXT, hash_create(), HASH_ELEM, HASH_STRINGS, HASHCTL::keysize, list_length(), NAMEDATALEN, pendingActions, and pendingListenActions.
Referenced by PreCommit_Notify().
Definition at line 1903 of file async.c.
References fb(), HASH_FIND, hash_search(), and localChannelTable.
Referenced by asyncQueueProcessPageEntries().
Definition at line 3246 of file async.c.
References Assert, Notification::channel_len, Notification::data, DatumGetUInt32(), hash_any(), and Notification::payload_len.
Referenced by AddEventToPendingNotifies().
Definition at line 3260 of file async.c.
Referenced by AddEventToPendingNotifies().
Definition at line 3097 of file async.c.
References buf, DestRemote, elog, INFO, pq_beginmessage(), pq_endmessage(), pq_sendint32(), pq_sendstring(), PqMsg_NotificationResponse, and whereToSendOutput.
Referenced by asyncQueueProcessPageEntries(), and ProcessParallelMessage().
| Datum pg_listening_channels | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1095 of file async.c.
References ChannelName::channel, CStringGetTextDatum, fb(), hash_seq_init(), hash_seq_search(), localChannelTable, MemoryContextSwitchTo(), palloc(), SRF_FIRSTCALL_INIT, SRF_IS_FIRSTCALL, SRF_PERCALL_SETUP, SRF_RETURN_DONE, and SRF_RETURN_NEXT.
| Datum pg_notification_queue_usage | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2168 of file async.c.
References asyncQueueAdvanceTail(), asyncQueueUsage(), fb(), LW_SHARED, LWLockAcquire(), LWLockRelease(), PG_RETURN_FLOAT8, and usage().
| Datum pg_notify | ( | PG_FUNCTION_ARGS | ) |
Definition at line 860 of file async.c.
References Async_Notify(), PG_ARGISNULL, PG_GETARG_TEXT_PP, PG_RETURN_VOID, PreventCommandDuringRecovery(), and text_to_cstring().
Definition at line 1185 of file async.c.
References AccessExclusiveLock, ActionList::actions, asyncQueueAddEntries(), asyncQueueFillWarning(), asyncQueueIsFull(), BecomeRegisteredListener(), DEBUG1, elog, ereport, errcode(), errmsg, ERROR, NotificationList::events, fb(), foreach_ptr, GetCurrentTransactionId(), hash_seq_init(), hash_seq_search(), initGlobalChannelTable(), initLocalChannelTable(), initPendingListenActions(), InvalidOid, lappend(), lfirst, list_head(), LISTEN_LISTEN, LISTEN_UNLISTEN, LISTEN_UNLISTEN_ALL, LockSharedObject(), LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), MaxBackends, MemoryContextAlloc(), NIL, pendingActions, pendingNotifies, PrepareTableEntriesForListen(), PrepareTableEntriesForUnlisten(), PrepareTableEntriesForUnlistenAll(), QUEUE_HEAD, queueHeadAfterWrite, queueHeadBeforeWrite, SET_QUEUE_POS, signalPids, signalProcnos, TopMemoryContext, Trace_notify, NotificationList::uniqueChannelHash, and NotificationList::uniqueChannelNames.
Referenced by CommitTransaction().
Definition at line 1531 of file async.c.
References PendingListenEntry::action, GlobalChannelEntry::allocatedListeners, dsa_allocate, dsa_free(), dsa_get_address(), DsaPointerIsValid, dshash_find_or_insert, dshash_release_lock(), fb(), globalChannelDSA, GlobalChannelKeyInit(), globalChannelTable, HASH_ENTER, hash_search(), i, INITIAL_LISTENERS_ARRAY_SIZE, InvalidDsaPointer, GlobalChannelEntry::listenersArray, localChannelTable, memcpy(), MyDatabaseId, MyProcNumber, GlobalChannelEntry::numListeners, PENDING_LISTEN, and pendingListenActions.
Referenced by PreCommit_Notify().
Definition at line 1634 of file async.c.
References PendingListenEntry::action, Assert, fb(), HASH_ENTER, HASH_FIND, hash_search(), localChannelTable, PENDING_UNLISTEN, and pendingListenActions.
Referenced by PreCommit_Notify().
Definition at line 1664 of file async.c.
References PendingListenEntry::action, fb(), HASH_ENTER, hash_search(), hash_seq_init(), hash_seq_search(), localChannelTable, PENDING_UNLISTEN, and pendingListenActions.
Referenced by PreCommit_Notify().
Definition at line 3056 of file async.c.
References asyncQueueReadAllNotifications(), CommitTransactionCommand(), DEBUG1, elog, LocalChannelTableIsEmpty, notifyInterruptPending, pq_flush, set_ps_display(), StartTransactionCommand(), and Trace_notify.
Referenced by ProcessNotifyInterrupt().
Definition at line 2579 of file async.c.
References IsTransactionOrTransactionBlock(), notifyInterruptPending, and ProcessIncomingNotify().
Referenced by PostgresMain(), and ProcessClientReadInterrupt().
|
static |
Definition at line 996 of file async.c.
References ActionList::actions, CurTransactionContext, fb(), GetCurrentTransactionNestLevel(), lappend(), list_make1, MemoryContextAlloc(), MemoryContextSwitchTo(), ActionList::nestingLevel, palloc(), pendingActions, TopTransactionContext, and ActionList::upper.
Referenced by Async_Listen(), Async_Unlisten(), and Async_UnlistenAll().
|
static |
Definition at line 1694 of file async.c.
References dsa_free(), dshash_delete_entry(), fb(), globalChannelDSA, globalChannelTable, idx(), GlobalChannelEntry::listenersArray, and GlobalChannelEntry::numListeners.
Referenced by ApplyPendingListenActions().
Definition at line 2266 of file async.c.
References Assert, asyncQueuePageDiff(), DEBUG3, dsa_get_address(), dshash_find(), dshash_release_lock(), elog, fb(), foreach_ptr, globalChannelDSA, GlobalChannelKeyInit(), globalChannelTable, i, INVALID_PROC_NUMBER, InvalidPid, j, GlobalChannelEntry::listenersArray, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), MyDatabaseId, MyProcPid, notifyInterruptPending, GlobalChannelEntry::numListeners, pendingNotifies, PROCSIG_NOTIFY_INTERRUPT, QUEUE_BACKEND_IS_ADVANCING, QUEUE_BACKEND_PID, QUEUE_BACKEND_POS, QUEUE_BACKEND_WAKEUP_PENDING, QUEUE_CLEANUP_DELAY, QUEUE_FIRST_LISTENER, QUEUE_HEAD, QUEUE_NEXT_LISTENER, QUEUE_POS_EQUAL, QUEUE_POS_PAGE, QUEUE_POS_PRECEDES, queueHeadAfterWrite, queueHeadBeforeWrite, SendProcSignal(), signalPids, signalProcnos, and NotificationList::uniqueChannelNames.
Referenced by AtCommit_Notify().
Definition at line 558 of file async.c.
Referenced by asyncQueueUnregister(), AtAbort_Notify(), AtCommit_Notify(), and BecomeRegisteredListener().
|
static |
Definition at line 347 of file async.c.
Referenced by asyncQueueFillWarning(), AsyncShmemInit(), AsyncShmemRequest(), and initGlobalChannelTable().
| const ShmemCallbacks AsyncShmemCallbacks |
Definition at line 415 of file async.c.
Referenced by ApplyPendingListenActions(), CleanupListenersOnExit(), initGlobalChannelTable(), PrepareTableEntriesForListen(), RemoveListenerFromChannel(), and SignalBackends().
|
static |
Definition at line 414 of file async.c.
Referenced by ApplyPendingListenActions(), CleanupListenersOnExit(), initGlobalChannelTable(), PrepareTableEntriesForListen(), RemoveListenerFromChannel(), and SignalBackends().
|
static |
Definition at line 685 of file async.c.
Referenced by initGlobalChannelTable().
Definition at line 422 of file async.c.
Referenced by ApplyPendingListenActions(), CleanupListenersOnExit(), initLocalChannelTable(), IsListeningOn(), pg_listening_channels(), PrepareTableEntriesForListen(), PrepareTableEntriesForUnlisten(), and PrepareTableEntriesForUnlistenAll().
| int max_notify_queue_pages = 1048576 |
Definition at line 584 of file async.c.
Referenced by asyncQueueIsFull(), and asyncQueueUsage().
| volatile sig_atomic_t notifyInterruptPending = false |
Definition at line 552 of file async.c.
Referenced by HandleNotifyInterrupt(), PostgresMain(), ProcessClientReadInterrupt(), ProcessIncomingNotify(), ProcessNotifyInterrupt(), and SignalBackends().
|
static |
Definition at line 375 of file async.c.
Referenced by AsyncShmemRequest().
|
static |
Definition at line 458 of file async.c.
Referenced by Async_Unlisten(), Async_UnlistenAll(), AtCommit_Notify(), AtPrepare_Notify(), AtSubAbort_Notify(), AtSubCommit_Notify(), ClearPendingActionsAndNotifies(), initPendingListenActions(), PreCommit_Notify(), and queue_listen().
Definition at line 480 of file async.c.
Referenced by ApplyPendingListenActions(), ClearPendingActionsAndNotifies(), initPendingListenActions(), PrepareTableEntriesForListen(), PrepareTableEntriesForUnlisten(), and PrepareTableEntriesForUnlistenAll().
|
static |
Definition at line 534 of file async.c.
Referenced by AddEventToPendingNotifies(), Async_Notify(), AsyncExistsPendingNotify(), asyncQueueAddEntries(), AtCommit_Notify(), AtPrepare_Notify(), AtSubAbort_Notify(), AtSubCommit_Notify(), ClearPendingActionsAndNotifies(), PreCommit_Notify(), and SignalBackends().
|
static |
Definition at line 567 of file async.c.
Referenced by PreCommit_Notify(), and SignalBackends().
|
static |
Definition at line 566 of file async.c.
Referenced by PreCommit_Notify(), and SignalBackends().
Definition at line 574 of file async.c.
Referenced by PreCommit_Notify(), and SignalBackends().
|
static |
Definition at line 575 of file async.c.
Referenced by PreCommit_Notify(), and SignalBackends().
Definition at line 581 of file async.c.
Referenced by Async_Listen(), Async_Notify(), Async_Unlisten(), Async_UnlistenAll(), AtCommit_Notify(), BecomeRegisteredListener(), CleanupListenersOnExit(), PreCommit_Notify(), and ProcessIncomingNotify().
Definition at line 578 of file async.c.
Referenced by asyncQueueAddEntries(), and AtCommit_Notify().
Definition at line 555 of file async.c.
Referenced by Async_Unlisten(), Async_UnlistenAll(), and BecomeRegisteredListener().