Re: [DOCS] pg_total_relation_size() and CHECKPOINT

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: [DOCS] pg_total_relation_size() and CHECKPOINT
Дата
Msg-id 47EB98EA.7020402@dunslane.net
обсуждение исходный текст
Ответ на Re: [DOCS] pg_total_relation_size() and CHECKPOINT  ("Zubkovsky, Sergey" <Sergey.Zubkovsky@transas.com>)
Ответы Re: [DOCS] pg_total_relation_size() and CHECKPOINT  ("Zubkovsky, Sergey" <Sergey.Zubkovsky@transas.com>)
Список pgsql-hackers

Zubkovsky, Sergey wrote:
> Maybe this helps:
>
> "It is not an error to set a file pointer to a position beyond the end
> of the file. The size of the file does not increase until you call the
> SetEndOfFile, WriteFile, or WriteFileEx function. A write operation
> increases the size of the file to the file pointer position plus the
> size of the buffer written, which results in the intervening bytes
> uninitialized."
>
> http://msdn2.microsoft.com/en-us/library/aa365541(VS.85).aspx
>
> According to Windows' lseek implementation (attached) SetEndOfFile()
> isn't called for this case.
>
>   
>

Yes, but we immediately follow the lseek bye a write(). See 
src/backend/storage/smgr/md.c:mdextend() .

cheers

andrew


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

Предыдущее
От: "Zubkovsky, Sergey"
Дата:
Сообщение: Re: [DOCS] pg_total_relation_size() and CHECKPOINT
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Script binaries renaming