LCOV - code coverage report
Current view: top level - src/backend/storage/ipc - procsignal.c (source / functions) Hit Total Coverage
Test: PostgreSQL 13beta1 Lines: 82 132 62.1 %
Date: 2020-06-03 11:07:14 Functions: 8 12 66.7 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*-------------------------------------------------------------------------
       2             :  *
       3             :  * procsignal.c
       4             :  *    Routines for interprocess signalling
       5             :  *
       6             :  *
       7             :  * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
       8             :  * Portions Copyright (c) 1994, Regents of the University of California
       9             :  *
      10             :  * IDENTIFICATION
      11             :  *    src/backend/storage/ipc/procsignal.c
      12             :  *
      13             :  *-------------------------------------------------------------------------
      14             :  */
      15             : #include "postgres.h"
      16             : 
      17             : #include <signal.h>
      18             : #include <unistd.h>
      19             : 
      20             : #include "access/parallel.h"
      21             : #include "commands/async.h"
      22             : #include "miscadmin.h"
      23             : #include "pgstat.h"
      24             : #include "replication/walsender.h"
      25             : #include "storage/ipc.h"
      26             : #include "storage/latch.h"
      27             : #include "storage/proc.h"
      28             : #include "storage/shmem.h"
      29             : #include "storage/sinval.h"
      30             : #include "tcop/tcopprot.h"
      31             : 
      32             : /*
      33             :  * The SIGUSR1 signal is multiplexed to support signalling multiple event
      34             :  * types. The specific reason is communicated via flags in shared memory.
      35             :  * We keep a boolean flag for each possible "reason", so that different
      36             :  * reasons can be signaled to a process concurrently.  (However, if the same
      37             :  * reason is signaled more than once nearly simultaneously, the process may
      38             :  * observe it only once.)
      39             :  *
      40             :  * Each process that wants to receive signals registers its process ID
      41             :  * in the ProcSignalSlots array. The array is indexed by backend ID to make
      42             :  * slot allocation simple, and to avoid having to search the array when you
      43             :  * know the backend ID of the process you're signalling.  (We do support
      44             :  * signalling without backend ID, but it's a bit less efficient.)
      45             :  *
      46             :  * The flags are actually declared as "volatile sig_atomic_t" for maximum
      47             :  * portability.  This should ensure that loads and stores of the flag
      48             :  * values are atomic, allowing us to dispense with any explicit locking.
      49             :  *
      50             :  * pss_signalFlags are intended to be set in cases where we don't need to
      51             :  * keep track of whether or not the target process has handled the signal,
      52             :  * but sometimes we need confirmation, as when making a global state change
      53             :  * that cannot be considered complete until all backends have taken notice
      54             :  * of it. For such use cases, we set a bit in pss_barrierCheckMask and then
      55             :  * increment the current "barrier generation"; when the new barrier generation
      56             :  * (or greater) appears in the pss_barrierGeneration flag of every process,
      57             :  * we know that the message has been received everywhere.
      58             :  */
      59             : typedef struct
      60             : {
      61             :     pid_t       pss_pid;
      62             :     sig_atomic_t pss_signalFlags[NUM_PROCSIGNALS];
      63             :     pg_atomic_uint64 pss_barrierGeneration;
      64             :     pg_atomic_uint32 pss_barrierCheckMask;
      65             : } ProcSignalSlot;
      66             : 
      67             : /*
      68             :  * Information that is global to the entire ProcSignal system can be stored
      69             :  * here.
      70             :  *
      71             :  * psh_barrierGeneration is the highest barrier generation in existence.
      72             :  */
      73             : typedef struct
      74             : {
      75             :     pg_atomic_uint64 psh_barrierGeneration;
      76             :     ProcSignalSlot psh_slot[FLEXIBLE_ARRAY_MEMBER];
      77             : } ProcSignalHeader;
      78             : 
      79             : /*
      80             :  * We reserve a slot for each possible BackendId, plus one for each
      81             :  * possible auxiliary process type.  (This scheme assumes there is not
      82             :  * more than one of any auxiliary process type at a time.)
      83             :  */
      84             : #define NumProcSignalSlots  (MaxBackends + NUM_AUXPROCTYPES)
      85             : 
      86             : /* Check whether the relevant type bit is set in the flags. */
      87             : #define BARRIER_SHOULD_CHECK(flags, type) \
      88             :     (((flags) & (((uint32) 1) << (uint32) (type))) != 0)
      89             : 
      90             : static ProcSignalHeader *ProcSignal = NULL;
      91             : static volatile ProcSignalSlot *MyProcSignalSlot = NULL;
      92             : 
      93             : static bool CheckProcSignal(ProcSignalReason reason);
      94             : static void CleanupProcSignalState(int status, Datum arg);
      95             : static void ProcessBarrierPlaceholder(void);
      96             : 
      97             : /*
      98             :  * ProcSignalShmemSize
      99             :  *      Compute space needed for procsignal's shared memory
     100             :  */
     101             : Size
     102        4344 : ProcSignalShmemSize(void)
     103             : {
     104             :     Size        size;
     105             : 
     106        4344 :     size = mul_size(NumProcSignalSlots, sizeof(ProcSignalSlot));
     107        4344 :     size = add_size(size, offsetof(ProcSignalHeader, psh_slot));
     108        4344 :     return size;
     109             : }
     110             : 
     111             : /*
     112             :  * ProcSignalShmemInit
     113             :  *      Allocate and initialize procsignal's shared memory
     114             :  */
     115             : void
     116        2170 : ProcSignalShmemInit(void)
     117             : {
     118        2170 :     Size        size = ProcSignalShmemSize();
     119             :     bool        found;
     120             : 
     121        2170 :     ProcSignal = (ProcSignalHeader *)
     122        2170 :         ShmemInitStruct("ProcSignal", size, &found);
     123             : 
     124             :     /* If we're first, initialize. */
     125        2170 :     if (!found)
     126             :     {
     127             :         int         i;
     128             : 
     129        2170 :         pg_atomic_init_u64(&ProcSignal->psh_barrierGeneration, 0);
     130             : 
     131      245556 :         for (i = 0; i < NumProcSignalSlots; ++i)
     132             :         {
     133      243386 :             ProcSignalSlot *slot = &ProcSignal->psh_slot[i];
     134             : 
     135      243386 :             slot->pss_pid = 0;
     136      243386 :             MemSet(slot->pss_signalFlags, 0, sizeof(slot->pss_signalFlags));
     137      243386 :             pg_atomic_init_u64(&slot->pss_barrierGeneration, PG_UINT64_MAX);
     138      243386 :             pg_atomic_init_u32(&slot->pss_barrierCheckMask, 0);
     139             :         }
     140             :     }
     141        2170 : }
     142             : 
     143             : /*
     144             :  * ProcSignalInit
     145             :  *      Register the current process in the procsignal array
     146             :  *
     147             :  * The passed index should be my BackendId if the process has one,
     148             :  * or MaxBackends + aux process type if not.
     149             :  */
     150             : void
     151       13082 : ProcSignalInit(int pss_idx)
     152             : {
     153             :     volatile ProcSignalSlot *slot;
     154             :     uint64      barrier_generation;
     155             : 
     156             :     Assert(pss_idx >= 1 && pss_idx <= NumProcSignalSlots);
     157             : 
     158       13082 :     slot = &ProcSignal->psh_slot[pss_idx - 1];
     159             : 
     160             :     /* sanity check */
     161       13082 :     if (slot->pss_pid != 0)
     162           0 :         elog(LOG, "process %d taking over ProcSignal slot %d, but it's not empty",
     163             :              MyProcPid, pss_idx);
     164             : 
     165             :     /* Clear out any leftover signal reasons */
     166       13082 :     MemSet(slot->pss_signalFlags, 0, NUM_PROCSIGNALS * sizeof(sig_atomic_t));
     167             : 
     168             :     /*
     169             :      * Initialize barrier state. Since we're a brand-new process, there
     170             :      * shouldn't be any leftover backend-private state that needs to be
     171             :      * updated. Therefore, we can broadcast the latest barrier generation and
     172             :      * disregard any previously-set check bits.
     173             :      *
     174             :      * NB: This only works if this initialization happens early enough in the
     175             :      * startup sequence that we haven't yet cached any state that might need
     176             :      * to be invalidated. That's also why we have a memory barrier here, to be
     177             :      * sure that any later reads of memory happen strictly after this.
     178             :      */
     179       13082 :     pg_atomic_write_u32(&slot->pss_barrierCheckMask, 0);
     180             :     barrier_generation =
     181       13082 :         pg_atomic_read_u64(&ProcSignal->psh_barrierGeneration);
     182       13082 :     pg_atomic_write_u64(&slot->pss_barrierGeneration, barrier_generation);
     183       13082 :     pg_memory_barrier();
     184             : 
     185             :     /* Mark slot with my PID */
     186       13082 :     slot->pss_pid = MyProcPid;
     187             : 
     188             :     /* Remember slot location for CheckProcSignal */
     189       13082 :     MyProcSignalSlot = slot;
     190             : 
     191             :     /* Set up to release the slot on process exit */
     192       13082 :     on_shmem_exit(CleanupProcSignalState, Int32GetDatum(pss_idx));
     193       13082 : }
     194             : 
     195             : /*
     196             :  * CleanupProcSignalState
     197             :  *      Remove current process from ProcSignal mechanism
     198             :  *
     199             :  * This function is called via on_shmem_exit() during backend shutdown.
     200             :  */
     201             : static void
     202       13082 : CleanupProcSignalState(int status, Datum arg)
     203             : {
     204       13082 :     int         pss_idx = DatumGetInt32(arg);
     205             :     volatile ProcSignalSlot *slot;
     206             : 
     207       13082 :     slot = &ProcSignal->psh_slot[pss_idx - 1];
     208             :     Assert(slot == MyProcSignalSlot);
     209             : 
     210             :     /*
     211             :      * Clear MyProcSignalSlot, so that a SIGUSR1 received after this point
     212             :      * won't try to access it after it's no longer ours (and perhaps even
     213             :      * after we've unmapped the shared memory segment).
     214             :      */
     215       13082 :     MyProcSignalSlot = NULL;
     216             : 
     217             :     /* sanity check */
     218       13082 :     if (slot->pss_pid != MyProcPid)
     219             :     {
     220             :         /*
     221             :          * don't ERROR here. We're exiting anyway, and don't want to get into
     222             :          * infinite loop trying to exit
     223             :          */
     224           0 :         elog(LOG, "process %d releasing ProcSignal slot %d, but it contains %d",
     225             :              MyProcPid, pss_idx, (int) slot->pss_pid);
     226           0 :         return;                 /* XXX better to zero the slot anyway? */
     227             :     }
     228             : 
     229             :     /*
     230             :      * Make this slot look like it's absorbed all possible barriers, so that
     231             :      * no barrier waits block on it.
     232             :      */
     233       13082 :     pg_atomic_write_u64(&slot->pss_barrierGeneration, PG_UINT64_MAX);
     234             : 
     235       13082 :     slot->pss_pid = 0;
     236             : }
     237             : 
     238             : /*
     239             :  * SendProcSignal
     240             :  *      Send a signal to a Postgres process
     241             :  *
     242             :  * Providing backendId is optional, but it will speed up the operation.
     243             :  *
     244             :  * On success (a signal was sent), zero is returned.
     245             :  * On error, -1 is returned, and errno is set (typically to ESRCH or EPERM).
     246             :  *
     247             :  * Not to be confused with ProcSendSignal
     248             :  */
     249             : int
     250        7940 : SendProcSignal(pid_t pid, ProcSignalReason reason, BackendId backendId)
     251             : {
     252             :     volatile ProcSignalSlot *slot;
     253             : 
     254        7940 :     if (backendId != InvalidBackendId)
     255             :     {
     256        7906 :         slot = &ProcSignal->psh_slot[backendId - 1];
     257             : 
     258             :         /*
     259             :          * Note: Since there's no locking, it's possible that the target
     260             :          * process detaches from shared memory and exits right after this
     261             :          * test, before we set the flag and send signal. And the signal slot
     262             :          * might even be recycled by a new process, so it's remotely possible
     263             :          * that we set a flag for a wrong process. That's OK, all the signals
     264             :          * are such that no harm is done if they're mistakenly fired.
     265             :          */
     266        7906 :         if (slot->pss_pid == pid)
     267             :         {
     268             :             /* Atomically set the proper flag */
     269        7906 :             slot->pss_signalFlags[reason] = true;
     270             :             /* Send signal */
     271        7906 :             return kill(pid, SIGUSR1);
     272             :         }
     273             :     }
     274             :     else
     275             :     {
     276             :         /*
     277             :          * BackendId not provided, so search the array using pid.  We search
     278             :          * the array back to front so as to reduce search overhead.  Passing
     279             :          * InvalidBackendId means that the target is most likely an auxiliary
     280             :          * process, which will have a slot near the end of the array.
     281             :          */
     282             :         int         i;
     283             : 
     284        1082 :         for (i = NumProcSignalSlots - 1; i >= 0; i--)
     285             :         {
     286        1082 :             slot = &ProcSignal->psh_slot[i];
     287             : 
     288        1082 :             if (slot->pss_pid == pid)
     289             :             {
     290             :                 /* the above note about race conditions applies here too */
     291             : 
     292             :                 /* Atomically set the proper flag */
     293          34 :                 slot->pss_signalFlags[reason] = true;
     294             :                 /* Send signal */
     295          34 :                 return kill(pid, SIGUSR1);
     296             :             }
     297             :         }
     298             :     }
     299             : 
     300           0 :     errno = ESRCH;
     301           0 :     return -1;
     302             : }
     303             : 
     304             : /*
     305             :  * EmitProcSignalBarrier
     306             :  *      Send a signal to every Postgres process
     307             :  *
     308             :  * The return value of this function is the barrier "generation" created
     309             :  * by this operation. This value can be passed to WaitForProcSignalBarrier
     310             :  * to wait until it is known that every participant in the ProcSignal
     311             :  * mechanism has absorbed the signal (or started afterwards).
     312             :  *
     313             :  * Note that it would be a bad idea to use this for anything that happens
     314             :  * frequently, as interrupting every backend could cause a noticeable
     315             :  * performance hit.
     316             :  *
     317             :  * Callers are entitled to assume that this function will not throw ERROR
     318             :  * or FATAL.
     319             :  */
     320             : uint64
     321           0 : EmitProcSignalBarrier(ProcSignalBarrierType type)
     322             : {
     323           0 :     uint64      flagbit = UINT64CONST(1) << (uint64) type;
     324             :     uint64      generation;
     325             : 
     326             :     /*
     327             :      * Set all the flags.
     328             :      *
     329             :      * Note that pg_atomic_fetch_or_u32 has full barrier semantics, so this is
     330             :      * totally ordered with respect to anything the caller did before, and
     331             :      * anything that we do afterwards. (This is also true of the later call to
     332             :      * pg_atomic_add_fetch_u64.)
     333             :      */
     334           0 :     for (int i = 0; i < NumProcSignalSlots; i++)
     335             :     {
     336           0 :         volatile ProcSignalSlot *slot = &ProcSignal->psh_slot[i];
     337             : 
     338           0 :         pg_atomic_fetch_or_u32(&slot->pss_barrierCheckMask, flagbit);
     339             :     }
     340             : 
     341             :     /*
     342             :      * Increment the generation counter.
     343             :      */
     344             :     generation =
     345           0 :         pg_atomic_add_fetch_u64(&ProcSignal->psh_barrierGeneration, 1);
     346             : 
     347             :     /*
     348             :      * Signal all the processes, so that they update their advertised barrier
     349             :      * generation.
     350             :      *
     351             :      * Concurrency is not a problem here. Backends that have exited don't
     352             :      * matter, and new backends that have joined since we entered this
     353             :      * function must already have current state, since the caller is
     354             :      * responsible for making sure that the relevant state is entirely visible
     355             :      * before calling this function in the first place. We still have to wake
     356             :      * them up - because we can't distinguish between such backends and older
     357             :      * backends that need to update state - but they won't actually need to
     358             :      * change any state.
     359             :      */
     360           0 :     for (int i = NumProcSignalSlots - 1; i >= 0; i--)
     361             :     {
     362           0 :         volatile ProcSignalSlot *slot = &ProcSignal->psh_slot[i];
     363           0 :         pid_t       pid = slot->pss_pid;
     364             : 
     365           0 :         if (pid != 0)
     366           0 :             kill(pid, SIGUSR1);
     367             :     }
     368             : 
     369           0 :     return generation;
     370             : }
     371             : 
     372             : /*
     373             :  * WaitForProcSignalBarrier - wait until it is guaranteed that all changes
     374             :  * requested by a specific call to EmitProcSignalBarrier() have taken effect.
     375             :  *
     376             :  * We expect that the barrier will normally be absorbed very quickly by other
     377             :  * backends, so we start by waiting just 1/8 of a second and then back off
     378             :  * by a factor of two every time we time out, to a maximum wait time of
     379             :  * 1 second.
     380             :  */
     381             : void
     382           0 : WaitForProcSignalBarrier(uint64 generation)
     383             : {
     384           0 :     long        timeout = 125L;
     385             : 
     386           0 :     for (int i = NumProcSignalSlots - 1; i >= 0; i--)
     387             :     {
     388           0 :         volatile ProcSignalSlot *slot = &ProcSignal->psh_slot[i];
     389             :         uint64      oldval;
     390             : 
     391           0 :         oldval = pg_atomic_read_u64(&slot->pss_barrierGeneration);
     392           0 :         while (oldval < generation)
     393             :         {
     394             :             int         events;
     395             : 
     396           0 :             CHECK_FOR_INTERRUPTS();
     397             : 
     398             :             events =
     399           0 :                 WaitLatch(MyLatch,
     400             :                           WL_LATCH_SET | WL_TIMEOUT | WL_EXIT_ON_PM_DEATH,
     401             :                           timeout, WAIT_EVENT_PROC_SIGNAL_BARRIER);
     402           0 :             ResetLatch(MyLatch);
     403             : 
     404           0 :             oldval = pg_atomic_read_u64(&slot->pss_barrierGeneration);
     405           0 :             if (events & WL_TIMEOUT)
     406           0 :                 timeout = Min(timeout * 2, 1000L);
     407             :         }
     408             :     }
     409             : 
     410             :     /*
     411             :      * The caller is probably calling this function because it wants to read
     412             :      * the shared state or perform further writes to shared state once all
     413             :      * backends are known to have absorbed the barrier. However, the read of
     414             :      * pss_barrierGeneration was performed unlocked; insert a memory barrier
     415             :      * to separate it from whatever follows.
     416             :      */
     417           0 :     pg_memory_barrier();
     418           0 : }
     419             : 
     420             : /*
     421             :  * Perform global barrier related interrupt checking.
     422             :  *
     423             :  * Any backend that participates in ProcSignal signalling must arrange to
     424             :  * call this function periodically. It is called from CHECK_FOR_INTERRUPTS(),
     425             :  * which is enough for normal backends, but not necessarily for all types of
     426             :  * background processes.
     427             :  */
     428             : void
     429           0 : ProcessProcSignalBarrier(void)
     430             : {
     431             :     uint64      generation;
     432             :     uint32      flags;
     433             : 
     434             :     /* Exit quickly if there's no work to do. */
     435           0 :     if (!ProcSignalBarrierPending)
     436           0 :         return;
     437           0 :     ProcSignalBarrierPending = false;
     438             : 
     439             :     /*
     440             :      * Read the current barrier generation, and then get the flags that are
     441             :      * set for this backend. Note that pg_atomic_exchange_u32 is a full
     442             :      * barrier, so we're guaranteed that the read of the barrier generation
     443             :      * happens before we atomically extract the flags, and that any subsequent
     444             :      * state changes happen afterward.
     445             :      */
     446           0 :     generation = pg_atomic_read_u64(&ProcSignal->psh_barrierGeneration);
     447           0 :     flags = pg_atomic_exchange_u32(&MyProcSignalSlot->pss_barrierCheckMask, 0);
     448             : 
     449             :     /*
     450             :      * Process each type of barrier. It's important that nothing we call from
     451             :      * here throws an error, because pss_barrierCheckMask has already been
     452             :      * cleared. If we jumped out of here before processing all barrier types,
     453             :      * then we'd forget about the need to do so later.
     454             :      *
     455             :      * NB: It ought to be OK to call the barrier-processing functions
     456             :      * unconditionally, but it's more efficient to call only the ones that
     457             :      * might need us to do something based on the flags.
     458             :      */
     459           0 :     if (BARRIER_SHOULD_CHECK(flags, PROCSIGNAL_BARRIER_PLACEHOLDER))
     460           0 :         ProcessBarrierPlaceholder();
     461             : 
     462             :     /*
     463             :      * State changes related to all types of barriers that might have been
     464             :      * emitted have now been handled, so we can update our notion of the
     465             :      * generation to the one we observed before beginning the updates. If
     466             :      * things have changed further, it'll get fixed up when this function is
     467             :      * next called.
     468             :      */
     469           0 :     pg_atomic_write_u64(&MyProcSignalSlot->pss_barrierGeneration, generation);
     470             : }
     471             : 
     472             : static void
     473           0 : ProcessBarrierPlaceholder(void)
     474             : {
     475             :     /*
     476             :      * XXX. This is just a placeholder until the first real user of this
     477             :      * machinery gets committed. Rename PROCSIGNAL_BARRIER_PLACEHOLDER to
     478             :      * PROCSIGNAL_BARRIER_SOMETHING_ELSE where SOMETHING_ELSE is something
     479             :      * appropriately descriptive. Get rid of this function and instead have
     480             :      * ProcessBarrierSomethingElse. Most likely, that function should live in
     481             :      * the file pertaining to that subsystem, rather than here.
     482             :      */
     483           0 : }
     484             : 
     485             : /*
     486             :  * CheckProcSignal - check to see if a particular reason has been
     487             :  * signaled, and clear the signal flag.  Should be called after receiving
     488             :  * SIGUSR1.
     489             :  */
     490             : static bool
     491     3243660 : CheckProcSignal(ProcSignalReason reason)
     492             : {
     493     3243660 :     volatile ProcSignalSlot *slot = MyProcSignalSlot;
     494             : 
     495     3243660 :     if (slot != NULL)
     496             :     {
     497             :         /* Careful here --- don't clear flag if we haven't seen it set */
     498     3243440 :         if (slot->pss_signalFlags[reason])
     499             :         {
     500        7630 :             slot->pss_signalFlags[reason] = false;
     501        7630 :             return true;
     502             :         }
     503             :     }
     504             : 
     505     3236030 :     return false;
     506             : }
     507             : 
     508             : /*
     509             :  * CheckProcSignalBarrier - check for new barriers we need to absorb
     510             :  */
     511             : static bool
     512      324366 : CheckProcSignalBarrier(void)
     513             : {
     514      324366 :     volatile ProcSignalSlot *slot = MyProcSignalSlot;
     515             : 
     516      324366 :     if (slot != NULL)
     517             :     {
     518             :         uint64      mygen;
     519             :         uint64      curgen;
     520             : 
     521      324344 :         mygen = pg_atomic_read_u64(&slot->pss_barrierGeneration);
     522      324344 :         curgen = pg_atomic_read_u64(&ProcSignal->psh_barrierGeneration);
     523      324344 :         return (mygen != curgen);
     524             :     }
     525             : 
     526          22 :     return false;
     527             : }
     528             : 
     529             : /*
     530             :  * procsignal_sigusr1_handler - handle SIGUSR1 signal.
     531             :  */
     532             : void
     533      324366 : procsignal_sigusr1_handler(SIGNAL_ARGS)
     534             : {
     535      324366 :     int         save_errno = errno;
     536             : 
     537      324366 :     if (CheckProcSignal(PROCSIG_CATCHUP_INTERRUPT))
     538        3138 :         HandleCatchupInterrupt();
     539             : 
     540      324366 :     if (CheckProcSignal(PROCSIG_NOTIFY_INTERRUPT))
     541          20 :         HandleNotifyInterrupt();
     542             : 
     543      324366 :     if (CheckProcSignal(PROCSIG_PARALLEL_MESSAGE))
     544        4438 :         HandleParallelMessageInterrupt();
     545             : 
     546      324366 :     if (CheckProcSignal(PROCSIG_WALSND_INIT_STOPPING))
     547          34 :         HandleWalSndInitStopping();
     548             : 
     549      324366 :     if (CheckProcSignal(PROCSIG_RECOVERY_CONFLICT_DATABASE))
     550           0 :         RecoveryConflictInterrupt(PROCSIG_RECOVERY_CONFLICT_DATABASE);
     551             : 
     552      324366 :     if (CheckProcSignal(PROCSIG_RECOVERY_CONFLICT_TABLESPACE))
     553           0 :         RecoveryConflictInterrupt(PROCSIG_RECOVERY_CONFLICT_TABLESPACE);
     554             : 
     555      324366 :     if (CheckProcSignal(PROCSIG_RECOVERY_CONFLICT_LOCK))
     556           0 :         RecoveryConflictInterrupt(PROCSIG_RECOVERY_CONFLICT_LOCK);
     557             : 
     558      324366 :     if (CheckProcSignal(PROCSIG_RECOVERY_CONFLICT_SNAPSHOT))
     559           0 :         RecoveryConflictInterrupt(PROCSIG_RECOVERY_CONFLICT_SNAPSHOT);
     560             : 
     561      324366 :     if (CheckProcSignal(PROCSIG_RECOVERY_CONFLICT_STARTUP_DEADLOCK))
     562           0 :         RecoveryConflictInterrupt(PROCSIG_RECOVERY_CONFLICT_STARTUP_DEADLOCK);
     563             : 
     564      324366 :     if (CheckProcSignal(PROCSIG_RECOVERY_CONFLICT_BUFFERPIN))
     565           0 :         RecoveryConflictInterrupt(PROCSIG_RECOVERY_CONFLICT_BUFFERPIN);
     566             : 
     567      324366 :     if (CheckProcSignalBarrier())
     568             :     {
     569           0 :         InterruptPending = true;
     570           0 :         ProcSignalBarrierPending = true;
     571             :     }
     572             : 
     573      324366 :     SetLatch(MyLatch);
     574             : 
     575      324366 :     latch_sigusr1_handler();
     576             : 
     577      324366 :     errno = save_errno;
     578      324366 : }

Generated by: LCOV version 1.13