PostgreSQL Source Code git master
|
#include <signal.h>
Go to the source code of this file.
Functions | |
Size | AsyncShmemSize (void) |
void | AsyncShmemInit (void) |
void | NotifyMyFrontEnd (const char *channel, const char *payload, int32 srcPid) |
void | Async_Notify (const char *channel, const char *payload) |
void | Async_Listen (const char *channel) |
void | Async_Unlisten (const char *channel) |
void | Async_UnlistenAll (void) |
void | PreCommit_Notify (void) |
void | AtCommit_Notify (void) |
void | AtAbort_Notify (void) |
void | AtSubCommit_Notify (void) |
void | AtSubAbort_Notify (void) |
void | AtPrepare_Notify (void) |
void | HandleNotifyInterrupt (void) |
void | ProcessNotifyInterrupt (bool flush) |
Variables | |
PGDLLIMPORT bool | Trace_notify |
PGDLLIMPORT int | max_notify_queue_pages |
PGDLLIMPORT volatile sig_atomic_t | notifyInterruptPending |
void Async_Listen | ( | const char * | channel | ) |
Definition at line 738 of file async.c.
References DEBUG1, elog, LISTEN_LISTEN, MyProcPid, queue_listen(), and Trace_notify.
Referenced by standard_ProcessUtility().
void Async_Notify | ( | const char * | channel, |
const char * | payload | ||
) |
Definition at line 591 of file async.c.
References AddEventToPendingNotifies(), AsyncExistsPendingNotify(), Notification::channel_len, CurTransactionContext, Notification::data, data, DEBUG1, elog, ereport, errcode(), errmsg(), ERROR, NotificationList::events, GetCurrentTransactionNestLevel(), NotificationList::hashtab, IsParallelWorker, list_make1, MemoryContextAlloc(), MemoryContextSwitchTo(), NAMEDATALEN, NotificationList::nestingLevel, NOTIFY_PAYLOAD_MAX_LENGTH, palloc(), Notification::payload_len, pendingNotifies, pfree(), TopTransactionContext, Trace_notify, and NotificationList::upper.
Referenced by pg_notify(), standard_ProcessUtility(), and triggered_change_notification().
void Async_Unlisten | ( | const char * | channel | ) |
Definition at line 752 of file async.c.
References DEBUG1, elog, LISTEN_UNLISTEN, MyProcPid, pendingActions, queue_listen(), Trace_notify, and unlistenExitRegistered.
Referenced by standard_ProcessUtility().
void Async_UnlistenAll | ( | void | ) |
Definition at line 770 of file async.c.
References DEBUG1, elog, LISTEN_UNLISTEN_ALL, MyProcPid, pendingActions, queue_listen(), Trace_notify, and unlistenExitRegistered.
Referenced by DiscardAll(), and standard_ProcessUtility().
void AsyncShmemInit | ( | void | ) |
Definition at line 502 of file async.c.
References add_size(), asyncQueueControl, asyncQueuePagePrecedes(), i, INVALID_PROC_NUMBER, InvalidOid, InvalidPid, AsyncQueueControl::lastQueueFillWarn, LWTRANCHE_NOTIFY_BUFFER, LWTRANCHE_NOTIFY_SLRU, MaxBackends, mul_size(), notify_buffers, NotifyCtl, QUEUE_BACKEND_DBOID, QUEUE_BACKEND_PID, QUEUE_BACKEND_POS, QUEUE_FIRST_LISTENER, QUEUE_HEAD, QUEUE_NEXT_LISTENER, QUEUE_STOP_PAGE, QUEUE_TAIL, SET_QUEUE_POS, ShmemInitStruct(), SimpleLruInit(), size, SlruScanDirCbDeleteAll(), SlruScanDirectory(), and SYNC_HANDLER_NONE.
Referenced by CreateOrAttachShmemStructs().
Size AsyncShmemSize | ( | void | ) |
Definition at line 485 of file async.c.
References add_size(), MaxBackends, mul_size(), notify_buffers, SimpleLruShmemSize(), and size.
Referenced by CalculateShmemSize().
void AtAbort_Notify | ( | void | ) |
Definition at line 1671 of file async.c.
References amRegisteredListener, asyncQueueUnregister(), ClearPendingActionsAndNotifies(), listenChannels, and NIL.
Referenced by AbortTransaction().
void AtCommit_Notify | ( | void | ) |
Definition at line 968 of file async.c.
References ListenAction::action, ActionList::actions, amRegisteredListener, asyncQueueAdvanceTail(), asyncQueueUnregister(), ListenAction::channel, ClearPendingActionsAndNotifies(), DEBUG1, elog, Exec_ListenCommit(), Exec_UnlistenAllCommit(), Exec_UnlistenCommit(), lfirst, LISTEN_LISTEN, LISTEN_UNLISTEN, LISTEN_UNLISTEN_ALL, listenChannels, NIL, pendingActions, pendingNotifies, SignalBackends(), Trace_notify, and tryAdvanceTail.
Referenced by CommitTransaction().
void AtPrepare_Notify | ( | void | ) |
Definition at line 836 of file async.c.
References ereport, errcode(), errmsg(), ERROR, pendingActions, and pendingNotifies.
Referenced by PrepareTransaction().
void AtSubAbort_Notify | ( | void | ) |
Definition at line 1761 of file async.c.
References GetCurrentTransactionNestLevel(), ActionList::nestingLevel, NotificationList::nestingLevel, pendingActions, pendingNotifies, pfree(), ActionList::upper, and NotificationList::upper.
Referenced by AbortSubTransaction().
void AtSubCommit_Notify | ( | void | ) |
Definition at line 1691 of file async.c.
References ActionList::actions, AddEventToPendingNotifies(), Assert, AsyncExistsPendingNotify(), NotificationList::events, GetCurrentTransactionNestLevel(), lfirst, list_concat(), ActionList::nestingLevel, NotificationList::nestingLevel, pendingActions, pendingNotifies, pfree(), ActionList::upper, and NotificationList::upper.
Referenced by CommitSubTransaction().
void HandleNotifyInterrupt | ( | void | ) |
Definition at line 1804 of file async.c.
References MyLatch, notifyInterruptPending, and SetLatch().
Referenced by procsignal_sigusr1_handler().
void NotifyMyFrontEnd | ( | const char * | channel, |
const char * | payload, | ||
int32 | srcPid | ||
) |
Definition at line 2224 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 HandleParallelMessage().
void PreCommit_Notify | ( | void | ) |
Definition at line 861 of file async.c.
References AccessExclusiveLock, ListenAction::action, ActionList::actions, asyncQueueAddEntries(), asyncQueueFillWarning(), asyncQueueIsFull(), DEBUG1, elog, ereport, errcode(), errmsg(), ERROR, NotificationList::events, Exec_ListenPreCommit(), GetCurrentTransactionId(), InvalidOid, lfirst, list_head(), LISTEN_LISTEN, LISTEN_UNLISTEN, LISTEN_UNLISTEN_ALL, LockSharedObject(), LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), pendingActions, pendingNotifies, and Trace_notify.
Referenced by CommitTransaction().
void ProcessNotifyInterrupt | ( | bool | flush | ) |
Definition at line 1834 of file async.c.
References IsTransactionOrTransactionBlock(), notifyInterruptPending, and ProcessIncomingNotify().
Referenced by PostgresMain(), and ProcessClientReadInterrupt().
|
extern |
Definition at line 428 of file async.c.
Referenced by asyncQueueIsFull(), and asyncQueueUsage().
|
extern |
Definition at line 413 of file async.c.
Referenced by HandleNotifyInterrupt(), PostgresMain(), ProcessClientReadInterrupt(), ProcessIncomingNotify(), ProcessNotifyInterrupt(), and SignalBackends().
|
extern |
Definition at line 425 of file async.c.
Referenced by Async_Listen(), Async_Notify(), Async_Unlisten(), Async_UnlistenAll(), AtCommit_Notify(), Exec_ListenPreCommit(), Exec_UnlistenAllCommit(), Exec_UnlistenCommit(), PreCommit_Notify(), and ProcessIncomingNotify().