Difference between revisions of "PostgreSQL data directory"

From wikieduonline
Jump to navigation Jump to search
 
(4 intermediate revisions by 2 users not shown)
Line 6: Line 6:
  
 
  Feb 11 11:24:33 ip-10-12-1-79 postgresql@14-main[9806]: [[pg_ctl]]: directory "/data" is not a database cluster directory
 
  Feb 11 11:24:33 ip-10-12-1-79 postgresql@14-main[9806]: [[pg_ctl]]: directory "/data" is not a database cluster directory
 +
 +
 +
Feb 11 11:32:02 ip-10-12-1-79 postgresql@14-main[9871]: 2023-02-15 11:32:02.088 UTC [9876] DETAIL:  Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).
 +
Feb 11 11:32:02 ip-10-12-1-79 postgresql@14-main[9871]: 2023-02-15 11:32:02.088 UTC [9876] FATAL:  data directory "/data" has invalid permissions
  
  
Line 12: Line 16:
 
  data_directory = '/var/lib/postgresql/10/main'
 
  data_directory = '/var/lib/postgresql/10/main'
  
{{postgreSQL.conf}}
+
postgresql.conf:#data_directory = '[[ConfigDir]]' # use data in another directory
 +
 
 +
 
 +
[[systemctl stop postgresql@14-main]]
 +
 
 +
== See also ==
 +
* {{postgresql.conf}}
 +
 
 +
[[Category:postgreSQL]]

Latest revision as of 13:51, 8 January 2024


sed -i s"/\/var\/lib\/postgresql\/14\/main"/"\/data"/ /etc/postgresql/*/main/postgresql.conf
Feb 11 11:12:24 ip-10-12-1-184 postgresql@14-main[10891]: Error: Data directory /data must not be owned by root
Feb 11 11:24:33 ip-10-12-1-79 postgresql@14-main[9806]: pg_ctl: directory "/data" is not a database cluster directory


Feb 11 11:32:02 ip-10-12-1-79 postgresql@14-main[9871]: 2023-02-15 11:32:02.088 UTC [9876] DETAIL:  Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).
Feb 11 11:32:02 ip-10-12-1-79 postgresql@14-main[9871]: 2023-02-15 11:32:02.088 UTC [9876] FATAL:  data directory "/data" has invalid permissions


data_directory
data_directory = '/var/lib/postgresql/10/main'
postgresql.conf:#data_directory = 'ConfigDir'		# use data in another directory


systemctl stop postgresql@14-main

See also[edit]

Advertising: