> On 10/03/2023 19:06 CET Holger Jakobs <holger@xxxxxxxxxx> wrote: > > What is a bit problematic running PostgreSQL on Windows is that the > installer by EDB doesn't create a new system user 'postgres' like > ususally is done by the package systems on Linux systems making this > system user the owner all directories and files of the database clusters > with exclusive permissions. Yeah, that also bugs me because I have to manage the password for the initial superuser. > Instead, the postgres.exe processes are run as an 'NT service', which is > also used by a lot of non-postgres processes. These processes have the > same permissions on Postgres' files as the Postgres processes. > > When I set up a lot of PostgreSQL servers on Windows machines a couple > of years ago, I had a script create a special user for the database > system and also made this special user the owner of all files and > directories of the clusters. Thanks for the tip. > I am afraid that some non-postgres process might have meddled with the > Postgres cluster causing trouble. My guess is Symantec Endpoint Protection because in the past it detected the EnterpriseDB installer and PostGIS installer as false-positive around 50% of the time. Seems plausible that it detected pg_ctl.exe after I updated to 14.7. > Maybe you can check ownership and permissions of the respective files. > Unfortunately, the permissions system on Windows is far more complex > than the one on Linux with just user owner, group owner and the > permissions r, w and x. * Owner of c:/program files/postgresql/{12,14} is group "Administrators" which has a couple of users. Also owns everything under bin/. * User "NETWORK SERVICE" is owner of most of the files under data/ with some files owned by the user who installed Postgres (myself in case of pg14, some other user in case of pg12). -- Erik