Re: [REVIEW] Re: Compression of full-page-writes

Поиск
Список
Период
Сортировка
От Rahila Syed
Тема Re: [REVIEW] Re: Compression of full-page-writes
Дата
Msg-id CAH2L28uL+iHvYjHaM+0R1QEcewp_RB7Dzipf5Q1QnZm8zmDP_w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [REVIEW] Re: Compression of full-page-writes  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: [REVIEW] Re: Compression of full-page-writes  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers

>        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.

Thank you,

Rahila Syed

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: why is PG_AUTOCONF_FILENAME is pg_config_manual.h?
Следующее
От: Ian Barwick
Дата:
Сообщение: Testing DDL deparsing support