Re: Documentation for initdb option --waldir
От | Laurenz Albe |
---|---|
Тема | Re: Documentation for initdb option --waldir |
Дата | |
Msg-id | 990b0bfa9ad2e68c517c3d5a29c48d37758877a1.camel@cybertec.at обсуждение исходный текст |
Ответ на | Re: Documentation for initdb option --waldir (Robert Treat <rob@xzilla.net>) |
Ответы |
Re: Documentation for initdb option --waldir
|
Список | pgsql-docs |
On Sat, 2025-03-29 at 10:26 -0400, Robert Treat wrote: > "Best practice is to create a directory within the mount-point > directory that is owned by the PostgreSQL user, and then create the > data directory within that. This avoids permissions problems,..." > > Which I do remember having tried to do it directly and the OS > complaining that my mount point wasn't owned by root and/or Postgres > complaining that the xlog dir wasn't owned by Postgres, so I think > this advice probably still holds. The root directory of a file system, which will be mounted at the mount point, should be owned by root. As far as I know, the reason is that it contains a "lost+found" directory, which is used by file system checks to put orphaned files. If a non-root user owned the mount point, the user could remove that directory, which would be a bad idea. On the other hand, PostgreSQL will protest if the directory isn't empty... Yours, Laurenz Albe
В списке pgsql-docs по дате отправления: