Re: fd.c: flush data problems on osx

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: fd.c: flush data problems on osx
Дата
Msg-id 2114.1460585358@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: fd.c: flush data problems on osx  (Andres Freund <andres@anarazel.de>)
Ответы Re: fd.c: flush data problems on osx  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2016-04-13 17:44:41 -0400, Tom Lane wrote:
>> fd.c tracks seek position for open files.  I'm not sure that that
>> function can get called with amount == 0, but if it did, the caller
>> would certainly not be expecting the file position to change.

> Ok, fair enough.  (And no, it should currently be never called that way)

BTW, I just noticed another issue here, which is that FileWriteback
and the corresponding smgr routines are declared with bogusly narrow
"amount" arguments --- eg, it's silly that FileWriteback only takes
an int amount.  I think this code could be actively broken for
relation segment sizes exceeding 2GB, and even if it isn't, we should
define the functions correctly the first time.

Will fix the function definitions, but I'm kind of wondering exactly how
many times the inner loop in IssuePendingWritebacks() could possibly
iterate ...
        regards, tom lane



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: fd.c: flush data problems on osx
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Missing PG_INT32_MIN in numutils.c