Re: postgresql latency & bgwriter not doing its job

Поиск
Список
Период
Сортировка
От Claudio Freire
Тема Re: postgresql latency & bgwriter not doing its job
Дата
Msg-id CAGTBQpYfD6-vtj=Nni4NnDz_6qGoCR6KOWkkPJCovepivkMphg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: postgresql latency & bgwriter not doing its job  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Fri, Sep 5, 2014 at 3:09 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Fri, Sep 5, 2014 at 4:17 AM, didier <did447@gmail.com> wrote:
>>> It's not the size of the array that's the problem; it's the size of
>>> the detonation when the allocation fails.
>>>
>> You can use a file backed memory array
>> Or because it's only a hint and
>> - keys are in buffers (BufferTag), right?
>> - transition is only from 'data I care to data I don't care' if a
>> buffer is concurrently evicted when sorting.
>>
>> Use a pre allocate buffer index array an read keys from buffers when
>> sorting, without memory barrier, spinlocks, whatever.
>
> If by a file-backed memory array you mean mmap() something, that
> doesn't do anything to address the possibility of failure.  mmap(),
> like malloc(), can fail.

It's worse. If your process needs to page from disk when touching a
byte in the mmap'd array, and the disk somehow fails to work, you get
a segmentation fault.



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: postgresql latency & bgwriter not doing its job
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: bad estimation together with large work_mem generates terrible slow hash joins