>        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
Considering Insert -> fullPageWrites is an int now, I think its better to
explicitly write the above as ,

doPageWrites = (Insert -> fullPageWrites != FULL_PAGE_WRITES_OFF ||

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.

Thank you,

Rahila Syed

Attachment: changes.patch
Description: Binary data

Attachment: 0002-Support-compression-for-full-page-writes-in-WAL.patch
Description: Binary data

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to