Re: Parameter value from (mb/gb) to bytes

Поиск
Список
Период
Сортировка
От Christoph Moench-Tegeder
Тема Re: Parameter value from (mb/gb) to bytes
Дата
Msg-id 20201014151726.GA50753@elch.exwg.net
обсуждение исходный текст
Ответ на Re: Parameter value from (mb/gb) to bytes  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-general
## Magnus Hagander (magnus@hagander.net):

> Actually, it doesn't have to be in 8k pages, that depends on the build
> options. So if you want to be perfectly correct, you should probably
> multiply with current_setting('block_size') instead of a hardcoded 8192 :)

More self-contained:
  select pg_size_bytes(setting) * pg_size_bytes(unit)
  from pg_settings
  where name = 'shared_buffers';

I guess that's what that unit column is there for.

Regards,
Christoph

-- 
Spare Space



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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: Parameter value from (mb/gb) to bytes
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Parameter value from (mb/gb) to bytes