Opened 20 years ago

Closed 20 years ago

Last modified 19 years ago

#2332 closed defect (duplicate)

Possible race condition creating postgresql user

Reported by: decibel (Jim Nasby) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.0
Keywords: Cc:
Port:

Description

Is there any reason not to have the port create the user account?

Change History (3)

comment:1 Changed 20 years ago by decibel (Jim Nasby)

op_sys: otherMac OS X
Summary: Have postgresql port create postgresql userPossible race condition creating postgresql user

---> Staging postgresql into destroot Error: Target com.apple.destroot returned: could not set owner for file "/opt/local/darwinports/dports/databases/postgresql/work/destroot/opt/local/var/db/pgsql": user "postgres" does not exist

However, after looking at users in system preferences, there is a postgres user. Running port install a second time suceeds.

comment:2 Changed 20 years ago by jberry@…

I've seen similar behavior in working on another port. The port creates the user/group, then tries to do a chown, or something, which fails. I tried for a while yesterday to replicate this, but couldn't. Perhaps, as suggested, this is a timing related issue.

I see that niutil has a "resync" op, and nicl (which we should probably be using instead of niutil) has both "resync" and "flush". It is not quite clear what either one does, but perhaps they would help to put netinfo into proper condition before trying to use the user/group??? Or maybe we could cure it with some magic "sleep".

comment:3 Changed 20 years ago by mww@…

Resolution: duplicate
Status: newclosed

we know of this bug: there is a sync problem with the user database on OS-X - for now, just try to destroot again; (the nicutil sync stuff doesnt work)

* This bug has been marked as a duplicate of 2050 *

Note: See TracTickets for help on using tickets.