mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
Remove redundant HandleWalWriterInterrupts().
Because of commit 1bdd54e662
, the code of HandleWalWriterInterrupts()
became the same as HandleMainLoopInterrupts(). So this commit removes
HandleWalWriterInterrupts() and makes walwriter use
HandleMainLoopInterrupts() for improved code simplicity.
Author: Fujii Masao
Reviewed-by: Bharath Rupireddy, Nathan Bossart
Discussion: https://postgr.es/m/CAHGQGwHUtwCsB4DnqFLiMiVzjcA=zmeCKf9_pgQM-yJopydatw@mail.gmail.com
This commit is contained in:
@ -78,9 +78,6 @@ int WalWriterFlushAfter = DEFAULT_WAL_WRITER_FLUSH_AFTER;
|
|||||||
#define LOOPS_UNTIL_HIBERNATE 50
|
#define LOOPS_UNTIL_HIBERNATE 50
|
||||||
#define HIBERNATE_FACTOR 25
|
#define HIBERNATE_FACTOR 25
|
||||||
|
|
||||||
/* Prototypes for private functions */
|
|
||||||
static void HandleWalWriterInterrupts(void);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Main entry point for walwriter process
|
* Main entry point for walwriter process
|
||||||
*
|
*
|
||||||
@ -245,7 +242,7 @@ WalWriterMain(void)
|
|||||||
ResetLatch(MyLatch);
|
ResetLatch(MyLatch);
|
||||||
|
|
||||||
/* Process any signals received recently */
|
/* Process any signals received recently */
|
||||||
HandleWalWriterInterrupts();
|
HandleMainLoopInterrupts();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Do what we're here for; then, if XLogBackgroundFlush() found useful
|
* Do what we're here for; then, if XLogBackgroundFlush() found useful
|
||||||
@ -275,26 +272,3 @@ WalWriterMain(void)
|
|||||||
WAIT_EVENT_WAL_WRITER_MAIN);
|
WAIT_EVENT_WAL_WRITER_MAIN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Interrupt handler for main loops of WAL writer process.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
HandleWalWriterInterrupts(void)
|
|
||||||
{
|
|
||||||
if (ProcSignalBarrierPending)
|
|
||||||
ProcessProcSignalBarrier();
|
|
||||||
|
|
||||||
if (ConfigReloadPending)
|
|
||||||
{
|
|
||||||
ConfigReloadPending = false;
|
|
||||||
ProcessConfigFile(PGC_SIGHUP);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ShutdownRequestPending)
|
|
||||||
proc_exit(0);
|
|
||||||
|
|
||||||
/* Perform logging of memory contexts of this process */
|
|
||||||
if (LogMemoryContextPending)
|
|
||||||
ProcessLogMemoryContextInterrupt();
|
|
||||||
}
|
|
||||||
|
Reference in New Issue
Block a user