We should prevent pg_resetxlog from being run as root: it writes new
files to $PGDATA, so running the tool as root will result in those files
being owned by root, which makes the data directory unusable.
Attached is a trivial patch that makes this change for Unix. I suppose a
similar fix is needed for Win32? If so, pgwin32_is_admin() would be the
natural routine to call, but that is currently in src/backend/port -- we
would need to move it to src/port, probably. Comments?
pgsql-patches by date
|Next:||From: Dave Page||Date: 2004-12-12 23:59:52|
|Subject: Re: pg_resetxlog as root|
|Previous:||From: Peter Eisentraut||Date: 2004-12-12 15:34:36|
|Subject: Re: [HACKERS] regression script/makefile exit failure|