While setting the full_page_write with SIGHUP I hit an assert in checkpoint process. And, that is because inside a CRITICAL section we are calling RecoveryInProgress which intern allocates memory. So I have moved RecoveryInProgress call out of the CRITICAL section and the problem got solved.
command executed: killall -SIGHUP postgres
Crash call stack:
#0 0x00007fa19560d5d7 in raise () from /lib64/libc.so.6
#1 0x00007fa19560ecc8 in abort () from /lib64/libc.so.6
#2 0x00000000009fc991 in ExceptionalCondition (conditionName=0xc5ab1c "!(CritSectionCount == 0)", errorType=0xc5a739 "FailedAssertion",
fileName=0xc5a8a5 "mcxt.c", lineNumber=635) at assert.c:54
#3 0x0000000000a34e56 in MemoryContextCreate (node=0x192edc0, tag=T_AllocSetContext, size=216, nameoffset=216, methods=0xc58620 <AllocSetMethods>,
parent=0x18fe1b0, name=0xac1137 "WAL record construction", flags=0) at mcxt.c:635
#4 0x0000000000a2aaa1 in AllocSetContextCreateExtended (parent=0x18fe1b0, name=0xac1137 "WAL record construction", flags=0, minContextSize=0,
initBlockSize=8192, maxBlockSize=8388608) at aset.c:463
#5 0x000000000055983c in InitXLogInsert () at xloginsert.c:1033
#6 0x000000000054e4e5 in InitXLOGAccess () at xlog.c:8183
#7 0x000000000054df71 in RecoveryInProgress () at xlog.c:7952
#8 0x00000000005507f6 in UpdateFullPageWrites () at xlog.c:9566
#9 0x00000000007ea821 in UpdateSharedMemoryConfig () at checkpointer.c:1366
#10 0x00000000007e95a1 in CheckpointerMain () at checkpointer.c:383
--