Re: [HACKERS] Re: initdb.sh fixed7

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Keith Parks <emkxp01(at)mtcc(dot)demon(dot)co(dot)uk>
Cc: peter_e(at)gmx(dot)net, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Re: initdb.sh fixed7
Date: 1999-12-20 18:20:39
Message-ID: 199912201820.NAA24934@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> >I am now using:
> >
> > POSTGRES_SUPERUSERID="`id -u 2>/dev/null || echo 0`"
> >
> >Let's see how portable that is?
>
> OOps,
>
> "id -u" is a no-no on Solaris unless /usr/xpg4/bin is before /bin in
> your path so we default to a userid of 0.
>
> And in miscinit we assert that UserID must not equal 0 which
> causes an Abort().
>
> bash-2.03$ bin/postgres -O template1
> DEBUG: Data Base System is starting up at Mon Dec 20 15:52:59 1999
> DEBUG: Data Base System was shutdowned at Mon Dec 20 15:52:52 1999
> DEBUG: CheckPoint record at (0, 152)
> DEBUG: Redo record at (0, 152); Undo record at (0, 0)
> DEBUG: NextTransactionId: 4621; NextOid: 0
> DEBUG: Invalid NextTransactionId/NextOid
> DEBUG: Data Base System is in production state at Mon Dec 20 15:52:59 1999
>
> POSTGRES backend interactive interface
> $Revision: 1.137 $ $Date: 1999/11/16 06:13:35 $
>
> backend> CREATE VIEW pg_user AS SELECT usename, usesysid, usecreatedb, usetrace,
> usesuper, usecatupd, '****
> ****'::text as passwd, valuntil FROM pg_shadow
> TRAP: Failed Assertion("!(((bool) ((UserId) != 0))):", File: "miscinit.c", Line:
> 433)
>
> !(((bool) ((UserId) != 0))) (0) [No such file or directory]
> Abort (core dumped)
> bash-2.03$

Oh, this is bad news. I see what you are saying. In 6.5.*, we had
pg_id, which was used to do this. We still have pg_id, but I assume the
attempt was to remove reliance ont that in the new initdb.sh. Right
Peter?

If so, can you suggest a solution under Solaris for getting the user id
value?

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Lamar Owen 1999-12-20 18:28:39 Re: [HACKERS] Cc: lamar.owen@wgcr.org
Previous Message Bruce Momjian 1999-12-20 18:14:51 Re: [HACKERS] Re: [COMMITTERS] pgsql/src/interfaces/libpgeasy (libpgeasy.c)