RE: Parallel copy

Поиск
Список
Период
Сортировка
От Hou, Zhijie
Тема RE: Parallel copy
Дата
Msg-id 37f541303fe747d2aa23fbcbbad12c25@G08CNEXMBPEKD05.g08.fujitsu.local
обсуждение исходный текст
Ответ на Re: Parallel copy  (vignesh C <vignesh21@gmail.com>)
Ответы Re: Parallel copy  (vignesh C <vignesh21@gmail.com>)
Список pgsql-hackers
Hi 

I found some issue in v9-0002

1.
+
+    elog(DEBUG1, "[Worker] Processing - line position:%d, block:%d, unprocessed lines:%d, offset:%d, line size:%d",
+         write_pos, lineInfo->first_block,
+         pg_atomic_read_u32(&data_blk_ptr->unprocessed_line_parts),
+         offset, pg_atomic_read_u32(&lineInfo->line_size));
+

write_pos or other variable to be printed here are type of uint32, I think it'better to use '%u' in elog msg.

2.
+         * line_size will be set. Read the line_size again to be sure if it is
+         * completed or partial block.
+         */
+        dataSize = pg_atomic_read_u32(&lineInfo->line_size);
+        if (dataSize)

It use dataSize( type int ) to get uint32 which seems a little dangerous.
Is it better to define dataSize uint32 here? 

3.
Since function with  'Cstate' in name has been changed to 'CState'
I think we can change function PopulateCommonCstateInfo as well.

4.
+    if (pcdata->worker_line_buf_count)

I think some check like the above can be 'if (xxx > 0)', which seems easier to understand.


Best regards,
houzj



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

Предыдущее
От: Sergei Kornilov
Дата:
Сообщение: Re: Allow some recovery parameters to be changed with reload
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: [PATCH] Add features to pg_stat_statements