Bruce Momjian <maillist@candle.pha.pa.us>
> 
> Are people still having problems with initdb.  I have fixed all the
> problems I can reproduce here.
> 
> If you are still having trouble, let me know.  If you sent a backtrace
> to the list, let me know if it is still valid.

Grabbed the latest from CVS when I got home from work (18:00 BST)

Built and initdb'd and heres what I get.

[postgres@sparclinux pgsql]$ rm -rf data
[postgres@sparclinux pgsql]$ initdb

We are initializing the database system with username postgres (uid=900).
This user will own all the files and must also own the server process.

Creating Postgres database system directory /usr/local/pgsql/data

Creating Postgres database system directory /usr/local/pgsql/data/base

Creating template database in /usr/local/pgsql/data/base/template1

Creating global classes in /base

Adding template1 database to pg_database...

Vacuuming template1
Creating public pg_user view
Loading pg_description
[postgres@sparclinux pgsql]$ startpm
+ postmaster -B 96 -i -d 2 -o -e -D /usr/local/pgsql/data
[postgres@sparclinux pgsql]$ psql template1
Welcome to the POSTGRESQL interactive sql monitor:
  Please read the file COPYRIGHT for copyright terms of POSTGRESQL

   type \? for help on slash commands
   type \q to quit
   type \g or terminate with semicolon to execute query
 You are currently connected to the database: template1

template1=> create table dummy ( dummy int );
pqReadData() -- backend closed the channel unexpectedly.
        This probably means the backend terminated abnormally before or while 
processing the request.
We have lost the connection to the backend, so further processing is impossible. 
 Terminating.
[postgres@sparclinux pgsql]$  

gdb shows the following backtrace.

Program received signal SIGSEGV, Segmentation fault.
0xe016e6b4 in _wordcopy_fwd_aligned ()
(gdb) where
#0  0xe016e6b4 in _wordcopy_fwd_aligned ()
#1  0xe011d62c in memmove ()
#2  0x26ad0 in DataFill (data=0x1afa24 "", tupleDesc=0x4, value=0xefffce3c,
    nulls=0xefffce40 "", infomask=0xefffcbc6, bit=0x1afa18 "\003")
    at heaptuple.c:208
#3  0x27abc in index_formtuple (tupleDescriptor=0x15b710, value=0xefffce3c,
    null=0xefffce40 "") at indextuple.c:78
#4  0x3ab8c in btinsert (rel=0x1b0510, datum=0xefffce3c, nulls=0xefffce40 "",
    ht_ctid=0x1b04a8, heapRel=0x3d) at nbtree.c:358
#5  0xd57e0 in fmgr_c (finfo=0xefffcd20, values=0xefffcd30, isNull=0xefffcd17 
"")
    at fmgr.c:115
#6  0xd5af0 in fmgr (procedureId=331) at fmgr.c:286
#7  0x33ab8 in index_insert (relation=0x1b0510, datum=0xefffce3c,
    nulls=0xefffce40 "", heap_t_ctid=0x1b04a8, heapRel=0x158410) at 
indexam.c:190
#8  0x478fc in CatalogIndexInsert (idescs=0xefffcef8, nIndices=3,
    heapRelation=0x158410, heapTuple=0x1b0490) at indexing.c:162
#9  0x44bb8 in AddNewAttributeTuples (new_rel_oid=18112, tupdesc=0x15b910)
    at heap.c:588
#10 0x44e5c in heap_create_with_catalog (relname=0x159290 "dummy",
    tupdesc=0x15b930, relkind=114 'r') at heap.c:805
#11 0x4bd48 in DefineRelation (stmt=0x159350, relkind=114 'r') at creatinh.c:140
#12 0xb06f8 in ProcessUtility (parsetree=0x159350, dest=Remote) at utility.c:176
#13 0xaeedc in pg_exec_query_dest (
    query_string=0xefffd1a0 "create table dummy ( dummy int );", dest=Remote)
    at postgres.c:654
#14 0xaee0c in pg_exec_query (
    query_string=0xefffd1a0 "create table dummy ( dummy int );") at 
postgres.c:602
#15 0xafd98 in PostgresMain (argc=1160192, argv=0xeffff1a0, real_argc=10,
    real_argv=0xeffffd84) at postgres.c:1429
#16 0x98c88 in DoBackend (port=0xfd800) at postmaster.c:1412
#17 0x986c4 in BackendStartup (port=0x15c000) at postmaster.c:1191
#18 0x97cf0 in ServerLoop () at postmaster.c:725
#19 0x97848 in PostmasterMain (argc=0, argv=0xeffffd84) at postmaster.c:534
#20 0x6c248 in main (argc=10, argv=0xeffffd84) at main.c:93
(gdb)

The "pg_user" problem is still there too:-

template1=> select * from pg_user;
ERROR:  Relation pg_user does not have attribute usename
template1=>      

Sorry I can't be more help than this :-(

Keith.


Fri, 21 Aug 1998 21:45:19 +0100 (BST)
Keith Parks <emkxp01@mtcc.demon.co.uk>
Re: [HACKERS] initdb problems