pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
change PID/GID
4+ messages / 4 participants
[nested] [flat]

* change PID/GID
@ 2016-12-09 15:20 Ray Stell <ray.stell@gmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Ray Stell @ 2016-12-09 15:20 UTC (permalink / raw)
  To: pgsql-admin

Due to some external, sysadmin issues, I'm forced to change the pid/gid 
of the postresql user on CentOS6.  I'm wondering if this plan of action 
has any flaws.  It seemed to work in a test environment to shutdown and 
change the pid/gid via:


     find / -uid 1500 -exec chown -h 2500:2500 {} \; (as root, of course)


Startup went ok, but I've not done this in production and find myself a 
little nervous.  I'll test in a hotstandby config here in a moment.  Any 
gotchas hiding in there?

BTW, -h will change symlinks, which I found handy.

     -h, --no-dereference
               affect each symbolic link instead of any referenced file 
(useful only on systems that can change the ownership of a symlink)

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* change pid/gid
@ 2016-12-09 15:21 Ray Stell <stellr@vt.edu>
  2016-12-09 15:33 ` Re: change pid/gid Tom Lane <tgl@sss.pgh.pa.us>
  2016-12-09 16:22 ` Re: change pid/gid hubert depesz lubaczewski <depesz@depesz.com>
  0 siblings, 2 replies; 4+ messages in thread

From: Ray Stell @ 2016-12-09 15:21 UTC (permalink / raw)
  To: pgsql-admin

Due to some external, sysadmin issues, I'm forced to change the pid/gid 
of the postresql user on CentOS6.  I'm wondering if this plan of action 
has any flaws.  It seemed to work in a test environment to shutdown and 
change the pid/gid via:


     find / -uid 1500 -exec chown -h 2500:2500 {} \; (as root, of course)


Startup went ok, but I've not done this in production and find myself a 
little nervous.  I'll test in a hotstandby config here in a moment.  Any 
gotchas hiding in there?

BTW, -h will change symlinks, which I found handy.

     -h, --no-dereference
               affect each symbolic link instead of any referenced file 
(useful only on systems that can change the ownership of a symlink)

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: change pid/gid
  2016-12-09 15:21 change pid/gid Ray Stell <stellr@vt.edu>
@ 2016-12-09 15:33 ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 4+ messages in thread

From: Tom Lane @ 2016-12-09 15:33 UTC (permalink / raw)
  To: Ray Stell <stellr@vt.edu>; +Cc: pgsql-admin

Ray Stell <stellr@vt.edu> writes:
> Due to some external, sysadmin issues, I'm forced to change the pid/gid 
> of the postresql user on CentOS6.  I'm wondering if this plan of action 
> has any flaws.

Changing file ownership should be sufficient as far as PG itself is
concerned, but if you have SELinux enabled (which you should) I'm
not certain how this will affect its rules.  I think that the answer
is "it doesn't", or at worst that you'd need to reboot after changing
the /etc/passwd mapping, but it's something to keep a side eye on.

			regards, tom lane


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: change pid/gid
  2016-12-09 15:21 change pid/gid Ray Stell <stellr@vt.edu>
@ 2016-12-09 16:22 ` hubert depesz lubaczewski <depesz@depesz.com>
  1 sibling, 0 replies; 4+ messages in thread

From: hubert depesz lubaczewski @ 2016-12-09 16:22 UTC (permalink / raw)
  To: Ray Stell <stellr@vt.edu>; +Cc: pgsql-admin

On Fri, Dec 09, 2016 at 10:21:43AM -0500, Ray Stell wrote:
> Due to some external, sysadmin issues, I'm forced to change the pid/gid of
> the postresql user on CentOS6.  I'm wondering if this plan of action has any
> flaws.  It seemed to work in a test environment to shutdown and change the
> pid/gid via:
> 
> 
>     find / -uid 1500 -exec chown -h 2500:2500 {} \; (as root, of course)
> Startup went ok, but I've not done this in production and find myself a
> little nervous.  I'll test in a hotstandby config here in a moment.  Any
> gotchas hiding in there?

no real gotchas, but change \; to + so that it will be MUCH faster.

Best regards,

depesz

-- 
The best thing about modern society is how easy it is to avoid contact with it.
                                                             http://depesz.com/


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2016-12-09 16:22 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-12-09 15:20 change PID/GID Ray Stell <ray.stell@gmail.com>
2016-12-09 15:21 change pid/gid Ray Stell <stellr@vt.edu>
2016-12-09 15:33 ` Re: change pid/gid Tom Lane <tgl@sss.pgh.pa.us>
2016-12-09 16:22 ` Re: change pid/gid hubert depesz lubaczewski <depesz@depesz.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox