Skip to content

Commit b44e5f6

Browse files
MasaoFujiipull[bot]
authored andcommitted
Remove redundant HandleWalWriterInterrupts().
Because of commit 1bdd54e, 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
1 parent 533bd3d commit b44e5f6

File tree

1 file changed

+1
-27
lines changed

1 file changed

+1
-27
lines changed

src/backend/postmaster/walwriter.c

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,6 @@ int WalWriterFlushAfter = DEFAULT_WAL_WRITER_FLUSH_AFTER;
7878
#define LOOPS_UNTIL_HIBERNATE 50
7979
#define HIBERNATE_FACTOR 25
8080

81-
/* Prototypes for private functions */
82-
static void HandleWalWriterInterrupts(void);
83-
8481
/*
8582
* Main entry point for walwriter process
8683
*
@@ -245,7 +242,7 @@ WalWriterMain(void)
245242
ResetLatch(MyLatch);
246243

247244
/* Process any signals received recently */
248-
HandleWalWriterInterrupts();
245+
HandleMainLoopInterrupts();
249246

250247
/*
251248
* Do what we're here for; then, if XLogBackgroundFlush() found useful
@@ -275,26 +272,3 @@ WalWriterMain(void)
275272
WAIT_EVENT_WAL_WRITER_MAIN);
276273
}
277274
}
278-
279-
/*
280-
* Interrupt handler for main loops of WAL writer process.
281-
*/
282-
static void
283-
HandleWalWriterInterrupts(void)
284-
{
285-
if (ProcSignalBarrierPending)
286-
ProcessProcSignalBarrier();
287-
288-
if (ConfigReloadPending)
289-
{
290-
ConfigReloadPending = false;
291-
ProcessConfigFile(PGC_SIGHUP);
292-
}
293-
294-
if (ShutdownRequestPending)
295-
proc_exit(0);
296-
297-
/* Perform logging of memory contexts of this process */
298-
if (LogMemoryContextPending)
299-
ProcessLogMemoryContextInterrupt();
300-
}

0 commit comments

Comments
 (0)