diff -rpcd a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c
*** a/src/backend/postmaster/autovacuum.c	2014-07-22 04:12:31.000000000 +0900
--- b/src/backend/postmaster/autovacuum.c	2014-07-31 12:30:09.000000000 +0900
*************** avl_sigusr2_handler(SIGNAL_ARGS)
*** 1342,1347 ****
--- 1342,1349 ----
  {
  	int			save_errno = errno;
  
+ 	procsignal_sigusr2_handler(SIGUSR2);
+ 
  	got_SIGUSR2 = true;
  	if (MyProc)
  		SetLatch(&MyProc->procLatch);
*************** AutoVacWorkerMain(int argc, char *argv[]
*** 1496,1502 ****
  
  	pqsignal(SIGPIPE, SIG_IGN);
  	pqsignal(SIGUSR1, procsignal_sigusr1_handler);
! 	pqsignal(SIGUSR2, SIG_IGN);
  	pqsignal(SIGFPE, FloatExceptionHandler);
  	pqsignal(SIGCHLD, SIG_DFL);
  
--- 1498,1504 ----
  
  	pqsignal(SIGPIPE, SIG_IGN);
  	pqsignal(SIGUSR1, procsignal_sigusr1_handler);
! 	pqsignal(SIGUSR2, procsignal_sigusr2_handler);
  	pqsignal(SIGFPE, FloatExceptionHandler);
  	pqsignal(SIGCHLD, SIG_DFL);
  
diff -rpcd a/src/backend/storage/ipc/procsignal.c b/src/backend/storage/ipc/procsignal.c
*** a/src/backend/storage/ipc/procsignal.c	2014-07-22 04:12:31.000000000 +0900
--- b/src/backend/storage/ipc/procsignal.c	2014-07-31 12:30:09.000000000 +0900
***************
*** 26,32 ****
  
  
  /*
!  * The SIGUSR1 signal is multiplexed to support signalling multiple event
   * types. The specific reason is communicated via flags in shared memory.
   * We keep a boolean flag for each possible "reason", so that different
   * reasons can be signaled to a process concurrently.  (However, if the same
--- 26,32 ----
  
  
  /*
!  * The SIGUSR2 signal is multiplexed to support signalling multiple event
   * types. The specific reason is communicated via flags in shared memory.
   * We keep a boolean flag for each possible "reason", so that different
   * reasons can be signaled to a process concurrently.  (However, if the same
*************** CleanupProcSignalState(int status, Datum
*** 140,146 ****
  	Assert(slot == MyProcSignalSlot);
  
  	/*
! 	 * Clear MyProcSignalSlot, so that a SIGUSR1 received after this point
  	 * won't try to access it after it's no longer ours (and perhaps even
  	 * after we've unmapped the shared memory segment).
  	 */
--- 140,146 ----
  	Assert(slot == MyProcSignalSlot);
  
  	/*
! 	 * Clear MyProcSignalSlot, so that a SIGUSR2 received after this point
  	 * won't try to access it after it's no longer ours (and perhaps even
  	 * after we've unmapped the shared memory segment).
  	 */
*************** SendProcSignal(pid_t pid, ProcSignalReas
*** 194,200 ****
  			/* Atomically set the proper flag */
  			slot->pss_signalFlags[reason] = true;
  			/* Send signal */
! 			return kill(pid, SIGUSR1);
  		}
  	}
  	else
--- 194,200 ----
  			/* Atomically set the proper flag */
  			slot->pss_signalFlags[reason] = true;
  			/* Send signal */
! 			return kill(pid, SIGUSR2);
  		}
  	}
  	else
*************** SendProcSignal(pid_t pid, ProcSignalReas
*** 218,224 ****
  				/* Atomically set the proper flag */
  				slot->pss_signalFlags[reason] = true;
  				/* Send signal */
! 				return kill(pid, SIGUSR1);
  			}
  		}
  	}
--- 218,224 ----
  				/* Atomically set the proper flag */
  				slot->pss_signalFlags[reason] = true;
  				/* Send signal */
! 				return kill(pid, SIGUSR2);
  			}
  		}
  	}
*************** SendProcSignal(pid_t pid, ProcSignalReas
*** 230,236 ****
  /*
   * CheckProcSignal - check to see if a particular reason has been
   * signaled, and clear the signal flag.  Should be called after receiving
!  * SIGUSR1.
   */
  static bool
  CheckProcSignal(ProcSignalReason reason)
--- 230,236 ----
  /*
   * CheckProcSignal - check to see if a particular reason has been
   * signaled, and clear the signal flag.  Should be called after receiving
!  * SIGUSR2.
   */
  static bool
  CheckProcSignal(ProcSignalReason reason)
*************** procsignal_sigusr1_handler(SIGNAL_ARGS)
*** 258,263 ****
--- 258,276 ----
  {
  	int			save_errno = errno;
  
+ 	latch_sigusr1_handler();
+ 
+ 	errno = save_errno;
+ }
+ 
+ /*
+  * procsignal_sigusr2_handler - handle SIGUSR2 signal.
+  */
+ void
+ procsignal_sigusr2_handler(SIGNAL_ARGS)
+ {
+ 	int			save_errno = errno;
+ 
  	if (CheckProcSignal(PROCSIG_CATCHUP_INTERRUPT))
  		HandleCatchupInterrupt();
  
*************** procsignal_sigusr1_handler(SIGNAL_ARGS)
*** 282,288 ****
  	if (CheckProcSignal(PROCSIG_RECOVERY_CONFLICT_BUFFERPIN))
  		RecoveryConflictInterrupt(PROCSIG_RECOVERY_CONFLICT_BUFFERPIN);
  
- 	latch_sigusr1_handler();
- 
  	errno = save_errno;
  }
--- 295,299 ----
diff -rpcd a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
*** a/src/backend/tcop/postgres.c	2014-07-22 04:12:31.000000000 +0900
--- b/src/backend/tcop/postgres.c	2014-07-31 12:30:09.000000000 +0900
*************** PostgresMain(int argc, char *argv[],
*** 3624,3630 ****
  		 */
  		pqsignal(SIGPIPE, SIG_IGN);
  		pqsignal(SIGUSR1, procsignal_sigusr1_handler);
! 		pqsignal(SIGUSR2, SIG_IGN);
  		pqsignal(SIGFPE, FloatExceptionHandler);
  
  		/*
--- 3624,3630 ----
  		 */
  		pqsignal(SIGPIPE, SIG_IGN);
  		pqsignal(SIGUSR1, procsignal_sigusr1_handler);
! 		pqsignal(SIGUSR2, procsignal_sigusr2_handler);
  		pqsignal(SIGFPE, FloatExceptionHandler);
  
  		/*
diff -rpcd a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c
*** a/src/backend/utils/init/postinit.c	2014-07-22 04:12:31.000000000 +0900
--- b/src/backend/utils/init/postinit.c	2014-07-31 12:30:09.000000000 +0900
*************** InitPostgres(const char *in_dbname, Oid 
*** 486,492 ****
  	 */
  	MyBackendId = InvalidBackendId;
  
! 	SharedInvalBackendInit(false);
  
  	if (MyBackendId > MaxBackends || MyBackendId <= 0)
  		elog(FATAL, "bad backend ID: %d", MyBackendId);
--- 486,496 ----
  	 */
  	MyBackendId = InvalidBackendId;
  
! 	/* walsender doesn't need sinval messages */
! 	if (am_walsender)
! 		SharedInvalBackendInit(true);
! 	else
! 		SharedInvalBackendInit(false);
  
  	if (MyBackendId > MaxBackends || MyBackendId <= 0)
  		elog(FATAL, "bad backend ID: %d", MyBackendId);
diff -rpcd a/src/include/storage/procsignal.h b/src/include/storage/procsignal.h
*** a/src/include/storage/procsignal.h	2014-07-22 04:12:31.000000000 +0900
--- b/src/include/storage/procsignal.h	2014-07-31 12:30:09.000000000 +0900
*************** extern int SendProcSignal(pid_t pid, Pro
*** 54,58 ****
--- 54,59 ----
  			   BackendId backendId);
  
  extern void procsignal_sigusr1_handler(SIGNAL_ARGS);
+ extern void procsignal_sigusr2_handler(SIGNAL_ARGS);
  
  #endif   /* PROCSIGNAL_H */
