7.4beta2 experiences working on OS X 10.[2-3].x

Поиск
Список
Период
Сортировка
От Johan Henselmans
Тема 7.4beta2 experiences working on OS X 10.[2-3].x
Дата
Msg-id E444D5C8-DCB8-11D7-BCFE-003065FAF6EC@netsense.nl
обсуждение исходный текст
Ответы Re: 7.4beta2 experiences working on OS X 10.[2-3].x  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: 7.4beta2 experiences working on OS X 10.[2-3].x  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Hi, I have just subscribed to the hackers mailinglist to telll what my  
adventures are with 7.4.b2 and OS X so far.

I have encountered some problems, and have some solutions, off which I  
do not know if they break the port, or do something wrong.

gcc3.3
=====
First, gcc3.3 on 10.2.x and 10.3.x  does nog get postgresql compiled.  
It seems to have to do with #ifdef indentation in the include files. I  
found some other references to it. I could work around some of the  
problems by removing spaces all "# ifdef" and "#  ifdef" and related  
commands in the include files, but in the end compilations failed on  
bootstrap.c, with an error message about y.tab.c. It seems Apple has  
some more work to do on gcc3.3.

I decided to try another compiler with the command gcc_select 3.1  
(which chooses the gcc 3.1 compiler).

That did a lot better. The beta compiled and installed.

initdb
====
I did however, encounter a problem with the supplied initdb. It seems  
that the test of the of shared memory segment is not used in the rest  
of the scripts: (log follows).

======================================================================== 
================================
bash-2.05a$ /usr/local/bin/initdb -D /usr/local/pgsql/data
The files belonging to this database system will be owned by user  
"postgres".
This user must also own the server process.

The database cluster will be initialized with locale C.

fixing permissions on existing directory /usr/local/pgsql/data... ok
creating directory /usr/local/pgsql/data/base... ok
creating directory /usr/local/pgsql/data/global... ok
creating directory /usr/local/pgsql/data/pg_xlog... ok
creating directory /usr/local/pgsql/data/pg_clog... ok
selecting default shared_buffers... 400
selecting default max_connections... 20
creating configuration files... ok
creating template1 database in /usr/local/pgsql/data/base/1... FATAL:   
could not create shared memory segment: Invalid argument
DETAIL:  Failed syscall was shmget(key=1, size=10444800, 03600).
HINT:  This error usually means that PostgreSQL's request for a shared  
memory segment exceeded your kernel's SHMMAX parameter.  You can either  
reduce the request size or reconfigure the kernel with larger SHMMAX.  
To reduce the request size (currently 10444800 bytes), reduce  
PostgreSQL's shared_buffers parameter (currently 1000) and/or its  
max_connections parameter (currently 100).
If the request size is already small, it's possible that it is less  
than your kernel's SHMMIN parameter, in which case raising the request  
size or reconfiguring SHMMIN is called for.
The PostgreSQL documentation contains more information about shared  
memory configuration.

initdb: failed


====================================================================




I could work around it by adding the arguments that were found by the  
test to the PGSQL_OPTS.

*** /usr/local/bin/initdb       Mon Sep  1 21:59:17 2003
--- /usr/local/bin/initdb.org   Mon Sep  1 16:50:05 2003
***************
*** 598,604 ****        "$PGDATA"/postgresql.conf
  echo "ok"
- PGSQL_OPT="$PGSQL_OPT -c shared_buffers=$nbuffers -c  
max_connections=$nconns"
   
######################################################################## 
##  #
--- 598,603 ----

With this patch I got the thing working.


test database with array.
===================

Finally, I reloaded the 7.3 dumped database. All loaded until the test  
database.

This is the log:

=============================
You are now connected to database "test".
SET
SET
psql:/Users/Shared/testsql.txt:24: ERROR:  syntax error at or near  
"array" at character 152
psql:/Users/Shared/testsql.txt:32: ERROR:  syntax error at or near  
"array" at character 40
psql:/Users/Shared/testsql.txt:33: invalid command \N
psql:/Users/Shared/testsql.txt:33: invalid command \N
psql:/Users/Shared/testsql.txt:34: invalid command \.
psql:/Users/Shared/testsql.txt:35: ERROR:  syntax error at or near "1"  
at character 1
=================================

The part of the reload that caused this mayhem was:


=================================
\connect test
--
-- PostgreSQL database dump
--

SET SESSION AUTHORIZATION 'johan';

SET search_path = public, pg_catalog;

--
-- TOC entry 2 (OID 28932)
-- Name: test; Type: TABLE; Schema: public; Owner: johan
--

CREATE TABLE test (    id integer,    name text,    val text,    score double precision,    date timestamp without time
zoneDEFAULT 'now()',    array text[]
 
);


--
-- Data for TOC entry 3 (OID 28932)
-- Name: test; Type: TABLE DATA; Schema: public; Owner: johan
--

COPY test (id, name, val, score, date, array) FROM stdin;
1       foo     horse   \N      2003-07-01 23:01:48.239622      \N
\.
========================================


hope this helps.



-johan

Johan Henselmans



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Larry Rosenman
Дата:
Сообщение: Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: 7.4beta2 experiences working on OS X 10.[2-3].x