initdb problems on Solaris

From: Keith Parks <emkxp01(at)mtcc(dot)demon(dot)co(dot)uk>
To: hackers(at)postgresql(dot)org
Subject: initdb problems on Solaris
Date: 2000-01-19 23:41:21
Message-ID: 200001192341.XAA11997@mtcc.demon.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi All,

I know that the whole "id" thing in initdb is a can of worms.
We have pg_id but we don't want to use it, every system has
a different version/variety of whoami/"who am i"/id.

We don't need/want to use the unix ID of the user, but we do
when we can. The whole thing is a mess!!

One thing we need to do is change the default, "if all else
fails" id from 0 to something else, as 0 is specifically
disallowed and causes an "Abort" in postgres when bootstrapping.

Here's a patch to set it to 1. ( failing any better suggestion)

Keith.

*** ./src/bin/initdb/initdb.sh.orig Wed Jan 19 08:58:13 2000
--- ./src/bin/initdb/initdb.sh Wed Jan 19 10:02:44 2000
***************
*** 129,135 ****
# fail, and in that case the argument _must_ be the name of the
effective
# user.
POSTGRES_SUPERUSERNAME="$EffectiveUser"
! POSTGRES_SUPERUSERID="`id -u 2>/dev/null || echo 0`"

while [ "$#" -gt 0 ]
do
--- 129,135 ----
# fail, and in that case the argument _must_ be the name of the
effective
# user.
POSTGRES_SUPERUSERNAME="$EffectiveUser"
! POSTGRES_SUPERUSERID="`id -u 2>/dev/null || echo 1`"

while [ "$#" -gt 0 ]
do

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Keith Parks 2000-01-19 23:55:41 Re: [HACKERS] initdb problems on Solaris
Previous Message Hiroshi Inoue 2000-01-19 23:19:26 RE: [HACKERS] Index recreation in vacuum