> if (!fullPageWrites)
> {
> WALInsertLockAcquireExclusive();
> Insert->fullPageWrites = fullPageWrites;
> WALInsertLockRelease();
> }
>
As fullPageWrites is not a boolean isnt it better to change the if condition as fullPageWrites == FULL_PAGE_WRITES_OFF? As it is done in the if condition above, this seems to be a miss.
>doPageWrites = (Insert->fullPageWrites || Insert->forcePageWrites);
IIUC, doPageWrites is true when fullPageWrites is either 'on' or 'compress'
Considering Insert -> fullPageWrites is an int now, I think its better to explicitly write the above as ,
doPageWrites = (Insert -> fullPageWrites != FULL_PAGE_WRITES_OFF || Insert->forcePageWrites)
The patch attached has the above changes. Also, it initializes doPageCompression in InitXLOGAccess as per earlier discussion.
I have attached the changes separately as changes.patch.