![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
DEBUG1 messages showed that there is an apparent limit of 255 xlog files per checkpoint - |
#3
| |||
| |||
|
|
Simon Riggs <simon (AT) 2ndquadrant (DOT) com> writes: DEBUG1 messages showed that there is an apparent limit of 255 xlog files per checkpoint - The volume-based checkpoint trigger code is if (IsUnderPostmaster && (openLogId != RedoRecPtr.xlogid || openLogSeg >= (RedoRecPtr.xrecoff / XLogSegSize) + (uint32) CheckPointSegments)) { #ifdef WAL_DEBUG if (XLOG_DEBUG) elog(LOG, "time for a checkpoint, signaling bgwriter"); #endif RequestCheckpoint(false); } which now that I look at it obviously forces a checkpoint whenever xlogid (the upper half of XLogRecPtr) changes, ie every 4GB of WAL output. I suppose on a high-performance platform it's possible that one would want checkpoints further apart than that, though the idea of plowing through multiple gigabytes of WAL in order to recover from a crash is a bit daunting. It's not immediately obvious how to recast the comparison without either creating overflow bugs or depending on 64-bit-int arithmetic being available. Thoughts? |
#4
| |||
| |||
|
|
I'd say no code changes for 8.0, now we know what's causing it. A doc patch to show the limit is probably just going to annoy the translators at this stage also. |
#5
| |||
| |||
|
|
Simon Riggs <simon (AT) 2ndquadrant (DOT) com> writes: I'd say no code changes for 8.0, now we know what's causing it. A doc patch to show the limit is probably just going to annoy the translators at this stage also. We could adjust guc.c to limit checkpoint_segments to the range 1..255 without having to touch any translatable strings. This isn't a necessary change but it seems harmless ... any objections? |
#6
| |||
| |||
|
|
Tom Lane <tgl (AT) sss (DOT) pgh.pa.us> writes: Simon Riggs <simon (AT) 2ndquadrant (DOT) com> writes: I'd say no code changes for 8.0, now we know what's causing it. A doc patch to show the limit is probably just going to annoy the translators at this stage also. We could adjust guc.c to limit checkpoint_segments to the range 1..255 without having to touch any translatable strings. This isn't a necessary change but it seems harmless ... any objections? Or we could just fix it. After thinking a bit more, I realized that it's not hard to push the forced-checkpoint boundary out to 2^32 segments instead of 255. That should be enough to still any complaints. |
![]() |
| Thread Tools | |
| Display Modes | |
| |