Hello PostgreSQL Documentation Team,

I would like to request clarification regarding the following statement in
the PostgreSQL 18 documentation for initdb:

initdb must be run as the user that will own the server process, because
the server needs to have access to the files and directories that initdb
creates. Since the server cannot be run as root, you must not run initdb as
root either. (It will in fact refuse to do so.)

I could not find a Windows-specific explanation of what constitutes the
required ownership identity.

Could you clarify which interpretation is intended for Windows?

   1.

   *Same-account requirement:* The Windows account that executes initdb
   must also be the Windows account under which the PostgreSQL server process
   subsequently runs.
   2.

   *Access-based requirement:* The accounts may differ, provided that the
   Windows account running the PostgreSQL server has the necessary access to
   the initialized data directory and related files.

If the intended behavior differs between Windows and Unix-like platforms,
it would also be helpful to clarify that distinction.

I also found a November 2022 discussion that touched on this paragraph, but
I could not find a definitive resolution of the Windows-specific question.

This question is particularly relevant to Windows installations that
register PostgreSQL as a Windows service using a dedicated service account.

I am not proposing a specific implementation or documentation change at
this stage. I would first like to understand the intended and supported
behavior.

Thank you for your time and for maintaining PostgreSQL documentation.

Reply via email to