Обсуждение: Postgres on macOS 10

Поиск
Список
Период
Сортировка

Postgres on macOS 10

От
"Nick Renders"
Дата:
Hi,

We just noticed something strange with our Postgres server.

We have Postgres 11 and 12 running on macOS 10.14 (Mojave), installed 
with the EDB installer. Whenever the machine is restarted, the Postgres 
service cannot be launched until a macOS user logs in. We have 
"automatic login" turned off in the system preferences, meaning that 
when the machine reboots, you get the macOS login screen.

In the system.log we see the following 2 lines over and over again, 
until a user has logged in:

    Mar  3 09:37:19 postgrestest com.apple.xpc.launchd[1] 
(com.edb.launchd.postgresql-12[319]): Service exited with abnormal code: 
2
    Mar  3 09:37:19 postgrestest com.apple.xpc.launchd[1] 
(com.edb.launchd.postgresql-12): Service only ran for 0 seconds. Pushing 
respawn out by 10 seconds.


It doesn't matter which macOS user logs in, doesn't have to be an 
Administrator. But once a user has logged in, the Postgres service is 
finally launched properly. Afterwards, the macOS user can log out again, 
and the service will continue running.

It doesn't seem to be limited to Mojave, either. I did a quick test on 
our older, decommissioned Postgres server (Postgres 9 on macOS 10.12) 
and the same issue seems to occur there.

Has anyone noticed something similar with macOS? Or is it just our 
setup?

Best regards,

Nick Renders



Re: Postgres on macOS 10

От
John DeSoi
Дата:
> On Mar 3, 2020, at 5:06 AM, Nick Renders <postgres@arcict.com> wrote:
>
> In the system.log we see the following 2 lines over and over again, until a user has logged in:
>
>     Mar  3 09:37:19 postgrestest com.apple.xpc.launchd[1] (com.edb.launchd.postgresql-12[319]): Service exited with
abnormalcode: 2 
>     Mar  3 09:37:19 postgrestest com.apple.xpc.launchd[1] (com.edb.launchd.postgresql-12): Service only ran for 0
seconds.Pushing respawn out by 10 seconds. 

To understand the issue, I think you need to look at the Postgres log and see if it gives a clue about why it did not
start.The startup log might be different from the normal Postgres logs depending on how the launch daemon sets it up. I
assumeyou will find that at /Library/LaunchDaemons/. 

John DeSoi, Ph.D.