Problem while setting the fpw with SIGHUP
Dilip Kumar <dilipbalaut@gmail.com>
From: Dilip Kumar <dilipbalaut@gmail.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2018-03-09T08:12:04Z
Lists: pgsql-hackers
Attachments
- fix_fpwupdate.patch (application/octet-stream) patch
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
--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com
Commits
-
Fix assertion failure when updating full_page_writes for checkpointer.
- 85cc9c4e2da8 9.5.15 landed
- e315bd7db96a 9.6.11 landed
- 8256d7ae9ee3 10.6 landed
- 6c8671bc395c 11.0 landed
- a86bf6057edf 12.0 landed
-
Attach FPI to the first record after full_page_writes is turned on.
- 47a589c1fe35 9.5.15 landed
- fd4f2af774db 9.6.11 landed
- ede7d8192ca3 10.6 landed
- ff4220ead2c8 11.0 landed
- bc153c941d2e 12.0 landed
-
Revamp the WAL record format.
- 2c03216d8311 9.5.0 cited
-
Move the backup-block logic from XLogInsert to a new file, xloginsert.c.
- 2076db2aea76 9.5.0 cited