homebrew-osgeo4mac: osgeo-postgresql services doesn't start properly

Since I upgraded from core postgresql formula to osgeo-postgresql, I have realised that every time I restart the OS, the server (or the cluster) is not properly started.

I think it could be related to the path configured on the service for the cluster. In the info of the formula at least, it’s suggested the following path:

$ pg_ctl start -D /usr/local/var/postgresql 

When in my case, with a cluster created with the core formula, would be:

$ pg_ctl start -D /usr/local/var/postgres

So I can manually start the cluster with the second statement, but the services isn’t functioning as expected at the end. Could it be fix in the formula? Or shall I modify a local file manually? I tried to manually edit the .plist file into the cellar directory of osgeo-postgresql and restart the service and the OS, but it doesn’t work.

Thank you.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 17

Most upvoted comments

@alazarolop thanks for the hint! I didn’t expect the copying-part but now fixed the problem.

I’ve added the following part to /usr/local/Cellar/osgeo-postgresql/11.2_2/homebrew.mxcl.osgeo-postgresql.plist and now I can start/stop with brew services restart osgeo-postgresql.

  <key>EnvironmentVariables</key>
  <dict>
    <key>LC_ALL</key>
    <string>en_US.UTF-8</string>
  </dict>

I’m not sure if this is a general fix (then a pull-request would make sense), e.g. is ‘en_US.UTF-8’ the right locale for everybody? Or does the brew services command inherit some other/default environment I should configure instead of patching the .plist file?

homebrew.mxcl.osgeo-postgresql.plist.txt

Cool! So I’m closing the issue then. Thank you all!

@alazarolop I’ll update PostgreSQL to its latest version and add what luis suggests to caveats so that it looks like formula information.

Since it is a solution for certain cases, for example, in my installation I have not had this problem.

tomorrow I will sit down to solve everything!