postgresql15 postgresql.cof-data_directory
在postgresql里,data_directory指的是数据库实例的数据目录,也就是postgresql存放数据文件、WAL、配置文件(部分)的地方。
data_directory参数值的修改,需要重启postgresql才能生效。
如何查看当前data_directory:
-bash-4.2$ psql psql (15.5) Type "help" for help. postgres=# show data_directory; data_directory ---------------- /pgdata (1 row) postgres=# postgres=# select current_setting('data_directory'); current_setting ----------------- /pgdata (1 row) postgres=#