Opened 14 years ago

Closed 13 years ago

#24958 closed defect (fixed)

postgresql84-server.wrapper forces logfile into an unwritable directory

Reported by: ashley.moran@… Owned by: mww@…
Priority: Normal Milestone:
Component: ports Version: 1.8.2
Keywords: Cc: jyrkiwahlstedt
Port: postgresql84-server

Description

Yesterday I was trying to tune the logging of my local Postgres installation and I was having trouble finding the file. I found a log file in /opt/local/var/log/postgresql84 but I wanted to have it date-rotated. After changing the config, I was still confused where it was logging, so I deleted postgres.log. Then Postgres wouldn't start up again.

Eventually I figured out that /opt/local/etc/LaunchDaemons/org.macports.postgresql84-server/postgresql84-server.wrapper overrides the log file with "-l /opt/local/var/log/postgresql84/postgres.log". BUT, this is a directory that the postgres server can't write to.

I lost an hour figuring out what was going on, even resorting to rebooting the machine.

I can see the appeal of having the log in a directory you can read as a non-postgres user. But, forcing Postgres to log to a directory it can't write to prevents you from doing the perfectly ordinary maintenance task of deleting log files.

I'd like to see this improved. Possibilities include making a subfolder of /opt/local/var/log with more usable permissions, or just not using the -l flag at all.

Change History (3)

comment:1 Changed 14 years ago by jmroot (Joshua Root)

Cc: jwa@… added
Owner: changed from macports-tickets@… to mww@…

Please remember to cc the maintainers.

comment:2 Changed 14 years ago by ashley.moran@…

Ah, sorry, I did not know I had to do that. (I think this is my first port ticket.) Will do in future.

comment:3 Changed 13 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.