Subject: Postgres Port on AIX 3.2

From: "Anuradha M. Sastri" <[email-masked]>
Date: Tue, 04 May 1993 10:50:24 -0700

Hai

	I am porting Postgres 4.1 to IBM RS/6000 running AIX 3.2. 
	While most of the files compiled with few modifications, 
	i am having problems getting the rest of the code compiled.

	* When i try to compile the files, 

		ex_flatten.c
		ex_junk.c 
		ex_qual.c 
		ex_tuples.c
		ex_utils.c
	 
	under executor in backend directory, i run into problems.

Problem Encountered :-

	I give the output of the compiler. 
 *********************************************************************************************
cc -g -DPORTNAME=aix -DPORTNAME_aix -DSEQUOIA -DPOSTGRESDIR='"/home/ortelius/u2/from.usr/src/bs
/postgres/postgres.v4/aix"'  -DDATADIR='"/home/ortelius/u2/from.usr/src/bs/postgres/postgres.v4
/aix/data"'  -DBINDIR='"/home/ortelius/u2/from.usr/src/bs/postgres/postgres.v4/aix/bin"'  -I../
. -I../obj  -I../port/aix -I../tmp  -c ../access/common/../../executor/ex_flatten.c
".././tmp/c.h", line 233.0: 1506-236 (W) Macro name CppAsString has been redefined.
"/usr/include/stddef.h", line 55.0: 1506-236 (W) Macro name offsetof has been redefined.
"../access/common/../../executor/ex_flatten.c", line 89.46: 1506-122 (S) Expecting pointer to s
truct or union.
"../access/common/../../executor/ex_flatten.c", line 106.9: 1506-046 (S) Syntax error.
"../access/common/../../executor/ex_flatten.c", line 133.50: 1506-122 (S) Expecting pointer to
struct or union.
"../access/common/../../executor/ex_flatten.c", line 151.46: 1506-122 (S) Expecting pointer to
struct or union.
*** Error code 1

Stop.
*** Error code 1

Stop.
 ************************************************************************************************

	Compilation of other modules give me the same problem. 

Suspected Cause :-

	I suspect that the module get_fj_innerNode which is being called at 
	line #89,133 and 151 is giving the problem.        

	The return value of get_fj_innerNode is being used in the macro tl_expr and
	there is no previous definition of get_fj_innerNode, earlier and so i get 
	this error. 

	Could you give me pointers as to what is going wrong.

---
Anu

---

From: "Anuradha M. Sastri" <[email-masked]>
Date: Fri, 21 May 1993 22:14:33 -0700

Hai

	I have ported the postgres v 4.1 on IBM RS/6000 running AIX 3.2.
	The initdb ran successfully. When i try to run the regression 
	tests, i encounter the following error. 

>createdb regression 

>WARN:May 21 21:59:14:cannot find attribute 1 of relation pg_user
/home/horton/u5/from.usr/src/bs/postgres/postgres.v4/aix/bin/createdb: database creation failed on regression.

	When I run the postmaster in the debug mode, i get the following message,
postmaster child[28442]: execv(/home/horton/u5/from.usr/src/bs/postgres/postgres.v4/aix/bin/postgres, -p, -d3, -o, /dev/null, -P5, template1, )
postmaster: BackendStartup: forked pid[28442] on socket 5
postmaster: ServerLoop:         done with 5
FindBackend: found "/home/horton/u5/from.usr/src/bs/postgres/postgres.v4/aix/bin/postgres" using argv[0]
        ---debug info---
        Quiet =        f
        Noversion =    f
        stable    =    f
        timings   =    f
        bufsize   =    64
        query echo =   f
        DatabaseName = [template1]
        ----------------

        InitPostgres()..
postmaster: reaping dead processes...

	When I run the postmaster under the dbx, i get the following stack trace
	trace.

	Did any of you encounter similar problems when porting. Please let me 
	know. 

	I would much appreciate, if some one gives me pointers as to what is going
	wrong. 

---
anu
	
==================================================================================
build_tupdesc_ind(relation = 0x201c96f8, attp = (nil), 0x201c96f8, 0x0, 0x6), line 588 in "relcache.c"
RelationBuildTupleDesc(buildinfo = (...), relation = 0x201c96f8, attp = (nil), natts = 6), line 499 in "relcache.c"
RelationBuildDesc(buildinfo = (...)), line 715 in "relcache.c"
RelationNameGetRelation(relationName = 0x201210a8), line 1053 in "relcache.c"
heap_openr(relationName = 0x201210a8), line 704 in "heapam.c"
unnamed block $b1330, line 158 in "catcache.c"
CatalogCacheInitializeCache(cache = 0x201c7648, relation = (nil)), line 158 in "catcache.c"
SearchSysCache(cache = 0x201c7648, v1 = "postgres", v2 = (nil), v3 = (nil), v4 = (nil)), line 792 in "catcache.c"
SearchSysCacheTuple(cacheId = 27, key1 = "postgres", key2 = (nil), key3 = (nil), key4 = (nil)), line 468 in "syscache.c"
SetUserId(), line 271 in "miscinit.c"
InitUserid(), line 282 in "postinit.c"
InitPostgres(name = "template1"), line 618 in "postinit.c"
PostgresMain(argc = 7, argv = 0x2ff7f938), line 1183 in "postgres.c"
main(argc = 7, argv = 0x2ff7f938), line 32 in "main.c"
201c7648, relation = (nil)), line 158 in "catcache.c"
SearchSysCache(cache = 0x201c7648, v1 = "postgres", v2 = (nil), v3 = (nil), v4 = (nil)), line 792 in "catcache.c"
SearchSysCacheTuple(cacheId = 27, key1 = "postgres", key2 = (nil), key3 = (nil), key4 = (nil)), line 468 in "syscache.c"
SetUserId(), line 271 in "miscinit.c"
InitUserid(), line 282 in "postinit.c"
InitPostgres(name = "template1"), line 618 in "postinit.c"
PostgresMain(argc = 7, argv = 0x2ff7f938), line 1183 in "postgres.c"
main(argc = 7, argv = 0x2ff7f938), line 32 in "main.c"7, argv = 0x2ff7f938), line 32 in "main.c"