Re: Initdb-time block size specification

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Initdb-time block size specification
Дата
Msg-id 20230630230457.vsryms45p7b2vjae@awork3.anarazel.de
обсуждение исходный текст
Ответ на Re: Initdb-time block size specification  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: Initdb-time block size specification  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
Hi,

On 2023-06-30 18:58:20 -0400, Bruce Momjian wrote:
> > [1] On linux I think you need to use stat() to figure out the st_dev for a
> > file, then look in /proc/self/mountinfo for the block device, use the name
> > of the file to look in /sys/block/$d/queue/physical_block_size.
>
> I just got a new server:
>
>     https://momjian.us/main/blogs/blog/2023.html#June_28_2023
>
> so tested this on my new M.2 NVME storage device:
>
>     $ /sys/block/nvme0n1/queue/physical_block_size
>     262144

Ah, I got the relevant filename wrong. I think it's logical_block_size, not
physical one (that's the size of addressing).  I didn't realize because the
devices I looked at have the same...

Regards,

Andres



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Initdb-time block size specification
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: Initdb-time block size specification