Thread

  1. initdb problems on Solaris

    Keith Parks <emkxp01@mtcc.demon.co.uk> — 2000-01-19T23:41:21Z

    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