pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedDefault UID for postgres user in linux
9+ messages / 5 participants
[nested] [flat]
* Default UID for postgres user in linux
@ 2014-04-09 13:28 Rama Krishnan <ramky25@gmail.com>
2014-04-11 19:16 ` Re: Default UID for postgres user in linux Steve Crawford <scrawford@pinpointresearch.com>
0 siblings, 1 reply; 9+ messages in thread
From: Rama Krishnan @ 2014-04-09 13:28 UTC (permalink / raw)
To: pgsql-admin
Hi All,
While installing postgres, a user named "postgres" will be automatically
created.
What is the default UID for postgres user in linux ?
--
--Regards
RAMAKRISHNAN KANDASAMY
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Default UID for postgres user in linux
2014-04-09 13:28 Default UID for postgres user in linux Rama Krishnan <ramky25@gmail.com>
@ 2014-04-11 19:16 ` Steve Crawford <scrawford@pinpointresearch.com>
2014-04-15 04:18 ` Re: Default UID for postgres user in linux Rama Krishnan <ramky25@gmail.com>
0 siblings, 1 reply; 9+ messages in thread
From: Steve Crawford @ 2014-04-11 19:16 UTC (permalink / raw)
To: Rama Krishnan <ramky25@gmail.com>; pgsql-admin
On 04/09/2014 06:28 AM, Rama Krishnan wrote:
> Hi All,
>
> While installing postgres, a user named "postgres" will be
> automatically created.
> What is the default UID for postgres user in linux ?
>
There isn't one. PostgreSQL isn't in charge of assigning user-names or
passwords and the user under which it runs does not have to be postgres.
Many Linux distributions will create a "postgres" user with PostgreSQL
is installed but the UID can vary depending on distribution and the
order that services were installed. I just looked at a few of my
machines and found UIDs of 114, 106, 107, 26, ... and a similar
variation in GID.
Cheers,
Steve
--
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] 9+ messages in thread
* Re: Default UID for postgres user in linux
2014-04-09 13:28 Default UID for postgres user in linux Rama Krishnan <ramky25@gmail.com>
2014-04-11 19:16 ` Re: Default UID for postgres user in linux Steve Crawford <scrawford@pinpointresearch.com>
@ 2014-04-15 04:18 ` Rama Krishnan <ramky25@gmail.com>
2014-04-15 20:51 ` Re: Default UID for postgres user in linux Steve Crawford <scrawford@pinpointresearch.com>
0 siblings, 1 reply; 9+ messages in thread
From: Rama Krishnan @ 2014-04-15 04:18 UTC (permalink / raw)
To: Steve Crawford <scrawford@pinpointresearch.com>; +Cc: pgsql-admin
Thanks all,
Actually I am trying to setup a postgres failover using common setup.
I.e,
A postgres data directory is stored in central location.
Two postgres uses the same location
If One postgres down and the other will start....
The problem is, If the postgres users in the two machines has different
UID's then i need to change ownership of data directory every time -- which
takes long time
If din't change ownership of data directory then i am getting access denied
errors ..
So if the both users have same UID's then there is no issue.
On Sat, Apr 12, 2014 at 12:46 AM, Steve Crawford <
scrawford@pinpointresearch.com> wrote:
> On 04/09/2014 06:28 AM, Rama Krishnan wrote:
>
>> Hi All,
>>
>> While installing postgres, a user named "postgres" will be automatically
>> created.
>> What is the default UID for postgres user in linux ?
>>
>> There isn't one. PostgreSQL isn't in charge of assigning user-names or
> passwords and the user under which it runs does not have to be postgres.
>
> Many Linux distributions will create a "postgres" user with PostgreSQL is
> installed but the UID can vary depending on distribution and the order that
> services were installed. I just looked at a few of my machines and found
> UIDs of 114, 106, 107, 26, ... and a similar variation in GID.
>
> Cheers,
> Steve
>
>
--
--Regards
RAMAKRISHNAN KANDASAMY
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Default UID for postgres user in linux
2014-04-09 13:28 Default UID for postgres user in linux Rama Krishnan <ramky25@gmail.com>
2014-04-11 19:16 ` Re: Default UID for postgres user in linux Steve Crawford <scrawford@pinpointresearch.com>
2014-04-15 04:18 ` Re: Default UID for postgres user in linux Rama Krishnan <ramky25@gmail.com>
@ 2014-04-15 20:51 ` Steve Crawford <scrawford@pinpointresearch.com>
0 siblings, 0 replies; 9+ messages in thread
From: Steve Crawford @ 2014-04-15 20:51 UTC (permalink / raw)
To: Rama Krishnan <ramky25@gmail.com>; +Cc: pgsql-admin
On 04/14/2014 09:18 PM, Rama Krishnan wrote:
> Thanks all,
>
> Actually I am trying to setup a postgres failover using common setup.
>
> I.e,
> A postgres data directory is stored in central location.
> Two postgres uses the same location
> If One postgres down and the other will start....
>
> The problem is, If the postgres users in the two machines has
> different UID's then i need to change ownership of data directory
> every time -- which takes long time
> If din't change ownership of data directory then i am getting access
> denied errors ..
>
> So if the both users have same UID's then there is no issue.
>
>
The postgres user is what most distros install but PostgreSQL can run
under pretty much any user. You will have to use care in how you install
(everything from the same base image, for instance) or do some
after-install tweaking of UIDs to make sure they match on all machines.
But...
I think you should explain your reasoning, setup and use-case more fully
to get ideas from the community. In most cases the part most likely to
fail or get corrupted is the storage - far more likely than the
CPU/RAM/etc.. It seems that your setup has the storage as a single point
of failure.
Unless you are very careful, you risk the possibility of both PostgreSQL
servers trying to connect to the same storage which will not end well.
You will also need to be sure to match not only UID but machine type,
architecture and OS. Don't assume that the files will be identical
between, say, 32-bit Windows and 64-bit Linux or even the same OS
installed on different CPU families.
Without more info it's hard to tell but it's possible that replication
or other solutions may better address your end goal.
Cheers,
Steve
--
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] 9+ messages in thread
* Default UID for postgres user in linux
@ 2014-04-09 13:30 RAMAKRISHNAN KANDASAMY <ramky24@gmail.com>
2014-04-14 20:23 ` Re: Default UID for postgres user in linux Scott Ribe <scott_ribe@elevated-dev.com>
2014-04-14 20:24 ` Re: Default UID for postgres user in linux Steve Crawford <scrawford@pinpointresearch.com>
0 siblings, 2 replies; 9+ messages in thread
From: RAMAKRISHNAN KANDASAMY @ 2014-04-09 13:30 UTC (permalink / raw)
To: pgsql-admin
Hi All,
While installing postgres, a user named "postgres" will be automatically
created.
What is the default UID for postgres user in linux ?
--
--Regards
RAMAKRISHNAN KANDASAMY
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Default UID for postgres user in linux
2014-04-09 13:30 Default UID for postgres user in linux RAMAKRISHNAN KANDASAMY <ramky24@gmail.com>
@ 2014-04-14 20:23 ` Scott Ribe <scott_ribe@elevated-dev.com>
1 sibling, 0 replies; 9+ messages in thread
From: Scott Ribe @ 2014-04-14 20:23 UTC (permalink / raw)
To: RAMAKRISHNAN KANDASAMY <ramky24@gmail.com>; +Cc: pgsql-admin
On Apr 9, 2014, at 7:30 AM, RAMAKRISHNAN KANDASAMY <ramky24@gmail.com> wrote:
> Hi All,
>
> While installing postgres, a user named "postgres" will be automatically created.
> What is the default UID for postgres user in linux ?
Asking the question repeatedly will not change the answer. (There is no default for the UID.)
--
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice
--
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] 9+ messages in thread
* Re: Default UID for postgres user in linux
2014-04-09 13:30 Default UID for postgres user in linux RAMAKRISHNAN KANDASAMY <ramky24@gmail.com>
@ 2014-04-14 20:24 ` Steve Crawford <scrawford@pinpointresearch.com>
2014-04-14 23:05 ` Re: Default UID for postgres user in linux Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 1 reply; 9+ messages in thread
From: Steve Crawford @ 2014-04-14 20:24 UTC (permalink / raw)
To: RAMAKRISHNAN KANDASAMY <ramky24@gmail.com>; pgsql-admin
On 04/09/2014 06:30 AM, RAMAKRISHNAN KANDASAMY wrote:
> Hi All,
>
> While installing postgres, a user named "postgres" will be
> automatically created.
> What is the default UID for postgres user in linux ?
>
Last week I answered this *exact* question for "ramky25@gmail.com" so
either someone isn't getting the clue and thinks the answer will be
different if asked by ramky24@gmail.com or people are cutting and
pasting homework questions into the mailing list. Either way, a) look up
the prior answer and b) this is a system administration question, not a
PostgreSQL question.
Cheers,
Steve
--
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] 9+ messages in thread
* Re: Default UID for postgres user in linux
2014-04-09 13:30 Default UID for postgres user in linux RAMAKRISHNAN KANDASAMY <ramky24@gmail.com>
2014-04-14 20:24 ` Re: Default UID for postgres user in linux Steve Crawford <scrawford@pinpointresearch.com>
@ 2014-04-14 23:05 ` Tom Lane <tgl@sss.pgh.pa.us>
2014-04-15 03:53 ` Re: Default UID for postgres user in linux RAMAKRISHNAN KANDASAMY <ramky24@gmail.com>
0 siblings, 1 reply; 9+ messages in thread
From: Tom Lane @ 2014-04-14 23:05 UTC (permalink / raw)
To: Steve Crawford <scrawford@pinpointresearch.com>; +Cc: RAMAKRISHNAN KANDASAMY <ramky24@gmail.com>; pgsql-admin
Steve Crawford <scrawford@pinpointresearch.com> writes:
> On 04/09/2014 06:30 AM, RAMAKRISHNAN KANDASAMY wrote:
>> While installing postgres, a user named "postgres" will be
>> automatically created.
>> What is the default UID for postgres user in linux ?
> Last week I answered this *exact* question for "ramky25@gmail.com" so
> either someone isn't getting the clue and thinks the answer will be
> different if asked by ramky24@gmail.com or people are cutting and
> pasting homework questions into the mailing list.
I think you're coming down too hard on the guy. Those two messages were
actually timestamped just a few minutes apart. I'm betting what happened
was he posted the message from an unsubscribed account, realized his error
when he got the autoreply, and reposted it from the right account. Some
time later, our overworked list moderators got around to approving the
original message, and it showed up here.
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] 9+ messages in thread
* Re: Default UID for postgres user in linux
2014-04-09 13:30 Default UID for postgres user in linux RAMAKRISHNAN KANDASAMY <ramky24@gmail.com>
2014-04-14 20:24 ` Re: Default UID for postgres user in linux Steve Crawford <scrawford@pinpointresearch.com>
2014-04-14 23:05 ` Re: Default UID for postgres user in linux Tom Lane <tgl@sss.pgh.pa.us>
@ 2014-04-15 03:53 ` RAMAKRISHNAN KANDASAMY <ramky24@gmail.com>
0 siblings, 0 replies; 9+ messages in thread
From: RAMAKRISHNAN KANDASAMY @ 2014-04-15 03:53 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Steve Crawford <scrawford@pinpointresearch.com>; pgsql-admin
Thanks all,
tom lane, You are right.
I first sent if from my unsubscribed account the after receiving ""Stalled
post to pgsql-admin. i realized it was sent from wrong mail. I apologize
for that...
On Tue, Apr 15, 2014 at 4:35 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Steve Crawford <scrawford@pinpointresearch.com> writes:
> > On 04/09/2014 06:30 AM, RAMAKRISHNAN KANDASAMY wrote:
> >> While installing postgres, a user named "postgres" will be
> >> automatically created.
> >> What is the default UID for postgres user in linux ?
>
> > Last week I answered this *exact* question for "ramky25@gmail.com" so
> > either someone isn't getting the clue and thinks the answer will be
> > different if asked by ramky24@gmail.com or people are cutting and
> > pasting homework questions into the mailing list.
>
> I think you're coming down too hard on the guy. Those two messages were
> actually timestamped just a few minutes apart. I'm betting what happened
> was he posted the message from an unsubscribed account, realized his error
> when he got the autoreply, and reposted it from the right account. Some
> time later, our overworked list moderators got around to approving the
> original message, and it showed up here.
>
> regards, tom lane
>
--
--Regards
RAMAKRISHNAN KANDASAMY
^ permalink raw reply [nested|flat] 9+ messages in thread
end of thread, other threads:[~2014-04-15 20:51 UTC | newest]
Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-04-09 13:28 Default UID for postgres user in linux Rama Krishnan <ramky25@gmail.com>
2014-04-11 19:16 ` Steve Crawford <scrawford@pinpointresearch.com>
2014-04-15 04:18 ` Rama Krishnan <ramky25@gmail.com>
2014-04-15 20:51 ` Steve Crawford <scrawford@pinpointresearch.com>
2014-04-09 13:30 Default UID for postgres user in linux RAMAKRISHNAN KANDASAMY <ramky24@gmail.com>
2014-04-14 20:23 ` Scott Ribe <scott_ribe@elevated-dev.com>
2014-04-14 20:24 ` Steve Crawford <scrawford@pinpointresearch.com>
2014-04-14 23:05 ` Tom Lane <tgl@sss.pgh.pa.us>
2014-04-15 03:53 ` RAMAKRISHNAN KANDASAMY <ramky24@gmail.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