| From: | Neil Conway <neilc(at)samurai(dot)com> |
|---|---|
| To: | pgsql-patches <pgsql-patches(at)postgresql(dot)org> |
| Subject: | pg_resetxlog as root |
| Date: | 2004-12-12 22:56:57 |
| Message-ID: | 1102892217.23208.7.camel@localhost.localdomain |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-patches |
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?
-Neil
| Attachment | Content-Type | Size |
|---|---|---|
| resetxlog_root-1.patch | text/x-patch | 1.1 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Dave Page | 2004-12-12 23:59:52 | Re: pg_resetxlog as root |
| Previous Message | Peter Eisentraut | 2004-12-12 15:34:36 | Re: [HACKERS] regression script/makefile exit failure |