How to change/set the block size in Postgres? Is there any file to make the configuration?

馋奶兔 提交于 2019-12-11 01:56:59

问题


I'm looking for the BLOCKSIZE configuration in postgres. I want to know is there a way to change/set the value?


回答1:


In PostgreSQL v11, you can do that when you create the cluster:

initdb --wal-segsize=<size in MB> [other options]

In older versions of PostgreSQL, you have to recompile after configuring with

./configure --with-wal-segsize=<size in MB>



回答2:


This is no runtime configuration.

https://www.postgresql.org/docs/current/storage-page-layout.html

Every table and index is stored as an array of pages of a fixed size (usually 8 kB, although a different page size can be selected when compiling the server).



来源:https://stackoverflow.com/questions/56147727/how-to-change-set-the-block-size-in-postgres-is-there-any-file-to-make-the-conf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!