Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)
Дата
Msg-id CA+TgmoY3CruZAB0WZd+K+G2peno=v=-aPxg6yzo0C=1nw116pQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)  (Peter Geoghegan <pg@bowt.ie>)
Список pgsql-hackers
On Tue, Jan 31, 2017 at 12:15 AM, Peter Geoghegan <pg@bowt.ie> wrote:
>> Should this 64KB minimum be mentioned in the documentation?
>
> You mean user-visible documentation, and not just tuplesort.h? I don't
> think that that's necessary. That's a ludicrously low amount of memory
> for a worker to be limited to anyway. It will never come up with
> remotely sensible use of the feature.

I agree.

>> +   if (!btspool->isunique)
>> +   {
>> +       shm_toc_estimate_keys(&pcxt->estimator, 2);
>> +   }
>>
>> Project style: people always tell me to drop the curlies in cases like
>> that.  There are a few more examples in the patch.
>
> I only do this when there is an "else" that must have curly braces,
> too. There are plenty of examples of this from existing code, so I
> think it's fine.

But I disagree on this one.  I think

if (blah)   stuff();
else
{   thing();   gargle();
}

...is much better than

if (blah)
{   stuff();
}
else
{   thing();   gargle();
}

But if there were a comment on a separate line before the call to
stuff(), then I would do it the second way.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Refactoring of replication commands using printsimple
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] An issue in remote query optimization