Opened 7 years ago

Closed 2 years ago

#54693 closed enhancement (duplicate)

Postgres96 history saved with wrong version

Reported by: jenstroeger (Jens Troeger) Owned by: jyrkiwahlstedt
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: cooljeanius (Eric Gallager)
Port: postgresql96-server

Description

I just installed postgres96:

~ > sudo -u postgres /opt/local/lib/postgresql96/bin/psql
psql (9.6.4)
Type "help" for help.

postgres=# \q
could not save history to file "/opt/local/var/db/postgresql94/.psql_history": No such file or directory

Note the postgres94 folder to save the history.

Change History (3)

comment:1 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: set to jyrkiwahlstedt
Port: postgresql96-server added
Priority: LowNormal
Status: newassigned

The very first time you install any of the postgresqlXY-server ports, they create the postgres user account and set its home directory to a path that includes that postgres version number. For example, if postgresql94-server was the first of those ports that you ever installed, the postgres user would have been created with its home directory set to /opt/local/var/db/postgresql94.

I'm not sure what the correct solution is in MacPorts, but you may be able to work around the problem by editing the postgres user (with dscl) to change its NFSHomeDirectory to the one you want it to use (e.g. the one for postgresql96).

This ticket might be considered a duplicate of #24180.

Last edited 7 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:2 Changed 3 years ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added

comment:3 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: duplicate
Status: assignedclosed
Note: See TracTickets for help on using tickets.