PostgreSQL >=V6.1 偺偨傔偺傛偔偁傞幙栤(FAQ)

Anderw C.R. Martin

martin@biochem.ucl.ac.uk

孠懞弫 - 擔杮岅栿

juk@rccm.co.jp

Jun 19 1998

PostgreSQL 偺 FAQ Linux 摿掕斉 - 捠忢偺 FAQ 偲暪偣偰偍撉傒壓偝偄丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

    栿拲: 偙偺暥彂偺嵟怴斉偼丄 http://www.biochem.ucl.ac.uk/~martin/
    pgsql/linux.faq 偵偁傝傑偡丅擔杮岅斉偼丄 http://www.rccm.co.jp/~juk
    /pgsql/faq-linux-j.shtml 偵偁傝傑偡丅
   
 

Changes in this version (* = modified, + = new, - = removed):

 丒 +1.23) 僐儞僷僀儖偑 F_BOOLIN, F_BOOLOUT 偍傛傃 F_BYTEAIN 偑枹掕媊偱
    偁傞偲偺儊僢僙乕僕偱幐攕偡傞偺偼側偤偱偡偐丠
   
偙偺僼傽僀儖偼偍偍傛偦師偺傛偆偵暿傟偰偄傑偡丗

 1. PostgreSQL 偺僐儞僷僀儖
   
 2. 晬懏僾儘僌儔儉偺僐儞僷僀儖
   
 3. 幚峴帪偺栤戣
   
1. PostgreSQL 偺僐儞僷僀儖
   
    1.1. src/Makefile.global 傗 src/Makefile.custom 偵偼壗傪曄峏偡傟偽
        傛偄偱偟傚偆偐丄傑偨丄偦偺懠偵昁梫側曄峏偼偁傝傑偡偐丠
    1.2. libreadline 偑尒偮偐傜側偄偲偄偆栤戣偼側偤婲偙傝傑偡偐丠
    1.3. [REDHAT] libdl 偲 dlfcn.h 偑尒偮偐傜側偄偲偄偆栤戣偼側偤婲偙傝
        傑偡偐丠
    1.4. [SLACKWARE 3.1] libdl 偲 dlfcn.h 偑尒偮偐傜側偄偲偄偆栤戣偼側
        偤婲偙傝傑偡偐丠
    1.5. backend 偺僐儞僷僀儖偑僀儞僋儖乕僪僼傽僀儖 dlfcn.h 偑尒偮偐傜
        側偄偲偄偆偙偲偱廔傝傑偡丅
    1.6. GCC 偑僆僾僔儑儞 -fpic 傪柍帇偟偨偲傏傗偒傑偡丅
    1.7. 師偺傛偆側寈崘傪庴偗庢傝傑偡丗 warning: cast from pointer to
        integer of different size
    1.8. [SuSE-Linux 4.2-4.4] curses 偲 termcap 偼偳偙偵偁傝傑偡偐丠
    1.9. ld.so 偱栤戣偑弌傞偺偼側偤偱偟傚偆丠
    1.10. 'yy_flush_buffer undefined' 偲偄偆僄儔乕偑弌傞偺偼側偤偱偟傚
        偆丠
    1.11. a.out 僔僗僥儉偱偼 PostgreSQL 傪偳偺傛偆偵僐儞僷僀儖偟傑偡偐
        丠
    1.12. 師偺傛偆偵 make 偑幐攕偡傞偺偼側偤偱偡偐丗 yacc -d /disk2/
        PostgreSQL/src/backend/parser/gram.y make: /usr/bin/make:
        cannot execute binary file
    1.13. src/Makefile.global 偺拞偱 X11_LIB 偺 libsocket 偲 libnsl 傊
        偺嶲徠偼壗偱偡偐丠
    1.14. [DEBIAN] libtermcap 偼偳偙偵偁傝傑偡偐丠
    1.15. [REDHAT] RPM 偱偺 PostgreSQL 偼庤偵擖傝傑偡偐丠
    1.16. Linux 偱奐敪僶乕僕儑儞傪僐儞僷僀儖偟傛偆偲偟偨傜丄師偺傛偆側
        儊僢僙乕僕偱幐攕偟傑偟偨丗 In file included from /usr/include/
        sys/sem.h:8, from ipc.c:37: /usr/include/asm/bitops.h:32:
        warning: no previous prototype for Set_bit' .... make: ***
        [ipc.o] Error 1
    1.17. postgres 傪僐儞僷僀儖偡傞偲偒丄gcc 偑 signal 11 傪弌偟偰棊偭
        偙偪傑偟偨丅 gcc: Internal compiler error: program cc1 got
        fatal signal 11
    1.18. MkLinux 偱 6.1.1 傪僀儞僗僩乕儖偱偒傑偡偐丠
    1.19. 儊僀僋偑廔偭偨傝丄僋儔僢僔儏偡傞偺偼偳偆偟偰丠
    1.20. 486 傗 Pentium 僾儘僙僢僒梡偺嵟揔壔偼偳偺傛偆偵偡傞偺偱偡偐丠
    1.21. 帪娫傪報嶞偟傛偆偲偡傞偲偳偆偟偰曄側寢壥偵側傞偺偱偡偐 (椺偊
        偽丄 regression 僥僗僩偺 'timespan)丠帪娫偼丄'5 hours' 偺偐傢傝
        偵 ' 4 hours 59 mins 60.00 secs' 偺傛偆偵側傝傑偡丅
    1.22. 6.3.2 傪僐儞僷僀儖偟偨帪偵 libpq 偺偨傔偺嫟桳儔僀僽儔儕偑偱偒
        側偄偺偼側偤偱偡偐丠
    1.23. 僐儞僷僀儖偑 F_BOOLIN, F_BOOLOUT 偍傛傃 F_BYTEAIN 偑枹掕媊偱
        偁傞偲偺儊僢僙乕僕偱幐攕偡傞偺偼側偤偱偡偐丠
   
2. 晬懏僾儘僌儔儉偺僐儞僷僀儖
   
    2.1. pgtclsh 傪僐儞僷僀儖偡傞帪丄儕儞僇偑 libX11 傪憑偣傑偣傫丅
   
3. 幚峴帪偺栤戣
   
    3.1. createuser 側偳偺僗僋儕僾僩傪憱傜偣傞帪丄
        _fUnKy_POSTPORT_sTuFf_ 偑枹掕媊偲偺僄儔乕曬崘傪庴偗庢傝傑偡丅
    3.2. postmaster 傪憱傜偣偨屻丄僔僗僥儉偑 ' Bad system call(Core
        dumped)' 偲尵偄傑偡丅
    3.3. postmaster 傪憱傜偣傛偆偲偡傞帪丄師偺傛偆側僄儔乕傪庴偗庢傞偺
        偼側偤偱偡偐丠
        劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
        劆  Failed Assertion("!(file != 0):(null)", File:                     劆
        劆  "/usr/local/PostgreSQL/src/backend/storage/file/fd.c", Line: 257) 劆
        劆  !(file != 0) (0)                                                  劆
        劆  initdb: could not create template database                        劆
        劆  initdb: cleaning up.                                              劆
        劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
    3.4. createuser 偑摦偐側偄偺偼側偤偱偡偐丠
    3.5. 師偺傛偆側僄儔乕傪庴偗庢傞偺偼側偤偱偡偐丗
        劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
        劆  IpcMemoryCreate: memKey=155356396 , size=760632 ,         劆
        劆  permission=384IpcMemoryCreate: shmget(..., create, ...)   劆
        劆  failed: Invalid argument                                  劆
        劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
    3.6. 偳偆偟偰丄psql 偑師偺傛偆偵幐攕偡傞偺偱偡偐丗 'psql: can't
        load library 'libpq.so.1'
    3.7. 偦偺懠偺婏柇側怳晳丅
    3.8. PostgreSQL 偑憱偭偰偄傞帪偵僔僗僥儉傪僔儍僢僩僟僂儞偡傞偲丄
        Linux 偼儕僽乕僩偺帪偵偄偮傕僨傿僗僋傪 fsck 偟傑偡丅
    3.9. regression 僥僗僩偺栤偄崌傢偣 32 偵偲偰傕帪娫偑偐偐傞偺偼側偤
        偱偡偐?
    3.10. 偁傞 date/time 偺墘嶼偱丄埲壓偺傛偆側柇側娵傔偲側傞偺偼側偤偱
        偡偐丠
   
1. PostgreSQL 偺僐儞僷僀儖

1.1. src/Makefile.global 傗 src/Makefile.custom 偵偼壗傪曄峏偡傟偽傛偄
偱偟傚偆偐丄傑偨丄偦偺懠偵昁梫側曄峏偼偁傝傑偡偐丠

makefile 摍傊偺曄峏偼丄Makefile.custom 傪彂偒弌偡 customize 僔僃儖僗僋
儕僾僩傪 src 僨傿儗僋僩儕偱憱傜偣傞偙偲偵傛傝嵟傕娙扨偵偱偒傑偡丅

[栿拲丗 customize 僐儅儞僪偼 6.1 埲崀側偔側傝傑偟偨丅 ]

偦偺懠偵傗傜側偔偰偼側傜側偄曄峏偼丄傕偟 Flex 偺僶乕僕儑儞偑傛偔抦傜傟
偰偄傞僶僌偺偁傞 2.5.3 偺応崌偼丄createuser 偑幐攕偡傞乮幙栤3.4 傪嶲徠
乯偺偱丄偦傟傪抲偒姺偊傞偙偲偱偡丅

傕偟丄makefile摍傪庤偱曇廤偡傞偺偱偁傟偽丄仛昁偢仛師偺曄悢傪僙僢僩偟側
偔偰偼側傝傑偣傫丗
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  PORTNAME=       linux                                             劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

傑偨丄師偺曄悢傕偁側偨偺僀儞僗僩乕儖傪峴側偆応強偵曄峏偡傞昁梫偑偁傝傑
偡丗
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  POSTGRESDIR                                                       劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

USE_TCL 僆僾僔儑儞傪惗偐偡側傜偽丄埲壓偺曄悢傪僙僢僩偡傞昁梫偑偁傝傑偡
丗
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  TCL_INCDIR=                                                       劆
劆  TCL_LIBDIR=                                                       劆
劆  TCL_LIB=                                                          劆
劆  TK_INCDIR=                                                        劆
劆  TK_LIBDIR=                                                        劆
劆  TK_LIB=                                                           劆
劆  X11_INCDIR=                                                       劆
劆  X11_LIBDIR=                                                       劆
劆  X11_LIB=                                                          劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

昅幰偺 Slackware3.0 僔僗僥儉偱偼丄偦傟傜偼丗
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  TCL_INCDIR=     /usr/include/tcl                                  劆
劆  TCL_LIBDIR=     /usr/lib                                          劆
劆  TCL_LIB=        -ltcl                                             劆
劆  TK_INCDIR=      /usr/include/tcl                                  劆
劆  TK_LIBDIR=      /usr/lib                                          劆
劆  TK_LIB=         -ltk                                              劆
劆  X11_INCDIR=     /usr/include/X11                                  劆
劆  X11_LIBDIR=     /usr/X386/lib                                     劆
劆  X11_LIB=        -lX11                                             劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

INSTALL 僼傽僀儖偲 Makefile.global 僼傽僀儖偵偁傞僪僉儏儊儞僩偵廬偭偰偦
偺懠偵昁梫側曄峏傪偟偰傕峔偄傑偣傫丅 

1.2. libreadline 偑尒偮偐傜側偄偲偄偆栤戣偼側偤婲偙傝傑偡偐丠

Linux 僔僗僥儉偼堦斒揑偵僀儞僗僩乕儖嵪傒偺 GNU readline 儔僀僽儔儕傪娷
傫偱偄傑偣傫丅GNU readline 儔僀僽儔儕傪僀儞僗僩乕儖偡傞偐丄傑偨偼丄src/
Makefile.global 偁傞偄偼 src/Makefile.custom 偱 readline 僆僾僔儑儞傪妶
惈壔偟側偄傛偆偵偟傑偟傚偆丅

Debian Linux 偱偼(FreeBSD 偺傛偆偵) readline 偑僀儞僗僩乕儖偝傟偰棃傞偙
偲傪偙偙偵婰偟偰偍偒傑偡丅 

1.3. [REDHAT] libdl 偲 dlfcn.h 偑尒偮偐傜側偄偲偄偆栤戣偼側偤婲偙傝傑偡
偐丠

偙偺偙偲帺恎偑丄僐儞僷僀儖偺嵟屻偺僼僃乕僘偱 dlopen() 傗 dlclose() 側偳
偺傛偆側娭悢偲儕儞僋偱偒側偄偙偲傪柧帵偟偰偄傑偡丅

libdl 儔僀僽儔儕偼儐乕僓採嫙娭悢偲偟偰幚峴帪偵摦揑寢崌偝傟傑偡丅偄偔偮
偐偺棟桼偺偨傔偵偙偺儔僀僽儔儕偼 Redhat 偺攝媼偐傜塳傟傑偟偨丅嵟嬤偺
RedHat 4.0(Colgate) 偱偼捈偭偰偄傑偡丅

崱偼丄怴偟偄 ld.so 偺 RPM 僷僢働乕僕偑 RedHat 偺 FTP 僒僀僩偵偁傝傑偡丅
娙扨偵擖庤偡傞偵偼:

 丒 ftp://ftp.redhat.com/pub/redhat/devel/i386/RedHat/RPMS/
    ld.so-1.7.14-4.i386.rpm
   
RPM 僼傽僀儖傪晛捠偵僀儞僗僩乕儖偟偰傗傝捈偟偰傒偰壓偝偄丅

拲堄両儔僀僽儔儕偺僀儞僗僩乕儖偺屻偵嵞僐儞僷僀儖傪峴側偆慜偵丄 
configure 傪憱傜偣捈偟偰 make clean 傪偟側偗傟偽側傜側偄偱偟傚偆丅

偙傟傜偺儔僀僽儔儕傪峏怴偟偰偄傞偲偒偵傾僋僙僗偡傞僾儘僌儔儉偺偨傔偵僔
僗僥儉偑棊偪偨偲尵偆曬崘偑堦偮偁傝傑偟偨(嬃偔偙偲偱偼偁傝傑偣傫偑)丅偟
偨偑偭偰丄怴偟偄儔僀僽儔儕傪僀儞僗僩乕儖偡傞慜偵僔僗僥儉傪嵞婲摦偡傞偺
偼椙偄峫偊偱丄側傞傋偔峏怴拞偼憱傜偣傞傕偺傪彮側偔偟傑偟傚偆丅僔儞僌儖
儐乕僓丒儌乕僪偵側傞偺偑椙偄偱偟傚偆丅

傕偟丄偦傟傪擄偟偄曽朄偱偟偨偄偺偱偁傟偽丄師偺応強偐傜儔僀僽儔儕偲僿僢
僟傪庢摼偡傞偙偲傕偱偒傑偡:

 丒 ftp://tsx-11.mit.edu/pub/linux/packages/GCC/ld.so-1.7.14.tar.gz
   
僐儞僷僀儖嵪偺僶僀僫儕傪 distributions/debian/buzz/binary-i386/base/
ld.so-1.7.14-4.deb 摨偠僒僀僩偱尒偮偗傞偐丄傑偨偼丄弶婜偺偙傠偺
Slackware 僷僢働乕僕偱偼 1.2 偺幙栤偲摨偠栤戣傪捈偡偐偺偳偪傜傪偟偰傕峔
偄傑偣傫丅偨偩偟屻幰曽朄偼丄帺暘偱傗偭偰偄傞偙偲偑偍傢偐傝偱側偗傟偽傗
傜側偄偱壓偝偄丅 

1.4. [SLACKWARE 3.1] libdl 偲 dlfcn.h 偑尒偮偐傜側偄偲偄偆栤戣偼側偤婲
偙傝傑偡偐丠

偙偺偙偲帺恎偑丄僐儞僷僀儖偺嵟屻偺僼僃乕僘偱 dlopen() 傗 dlclose() 側偳
偺傛偆側娭悢偲儕儞僋偱偒側偄偙偲傪柧帵偟偰偄傑偡丅

幙栤 1.3 偺夞摎傪屼棗壓偝偄丅僶乕僕儑儞 3.0 傑偱偺 Slackware 偼偙偺儔僀
僽儔儕偲僀儞僋儖乕僪僼傽僀儖偑採嫙偝傟傑偟偨偑丄弶婜偺 3.1 偺儕儕乕僗
(1996擭9寧9擔傛傝慜)偱偼柍偔側偭偰傑偟偨丅偦偟偰丄懡偔偺 CD-ROM 偺僶乕
僕儑儞偑偦偺嵟弶偺 3.1 偺儕儕乕僗傪擖傟偰偄傞偱偟傚偆丅

偙傟傜偺儔僀僽儔儕傪峏怴偟偰偄傞偲偒偵傾僋僙僗偡傞僾儘僌儔儉偺偨傔偵僔
僗僥儉偑棊偪偨偲尵偆曬崘偑堦偮偁傝傑偟偨(嬃偔偙偲偱偼偁傝傑偣傫偑)丅偟
偨偑偭偰丄怴偟偄儔僀僽儔儕傪僀儞僗僩乕儖偡傞慜偵僔僗僥儉傪嵞婲摦偡傞偺
偼椙偄峫偊偱丄側傞傋偔峏怴拞偼憱傜偣傞傕偺傪彮側偔偟傑偟傚偆丅僔儞僌儖
儐乕僓丒儌乕僪偵側傞偺偑椙偄偱偟傚偆丅

嵟傕娙扨側廋惓偼 ldso.tgz 傪嵟怴偺 Slackware 3.1 偺攝媼偺 a4 disk 偐傜
庢傝弌偟偰僼傽僀儖傪儖乕僩(/)僨傿儗僋僩儕偐傜揥奐偟偰丄偦偟偰丄
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  sh install/doinst.sh                                              劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

傪偟偰僀儞僗僩乕儖傪姰椆偟偰壓偝偄丅偦傟偵懕偗偰丄
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  ldconfig                                                          劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

拲堄両儔僀僽儔儕偺僀儞僗僩乕儖偺屻偵嵞僐儞僷僀儖傪峴側偆慜偵丄 
configure 傪憱傜偣捈偟偰 make clean 傪偟側偗傟偽側傜側偄偱偟傚偆丅

傪偟傑偡丅傕偟丄庤偱僀儞僗僩乕儖偟偨偗傟偽丄傑偢嵟弶偵 dlfcn.h 僼傽僀儖
傪 /usr/include 偵僀儞僗僩乕儖偟傑偡丅

師偵丄libdl.so.1.7.14 (偁傞偄偼丄摨條偺嵟怴偺儕儕乕僗)傪 /lib 偵僀儞僗
僩乕儖偟丄偦偟偰丄
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  cd /lib                                                           劆
劆  ln -sf libdl.so.1.7.14 libdl.so.1                                 劆
劆  ln -sf libdl.so.1 libdl.so                                        劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

傪峴側偄傑偡丅偁傞僔僗僥儉(GCC 偺愝掕偵傛傝傑偡)偱偼丄師偺偙偲傪峴側偆
昁梫偑偁傝傑偡:
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  cd /usr/lib                                                       劆
劆  ln -sf /lib/libdl.so .                                            劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

嵟屻偵丄
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  ldconfig                                                          劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

偟傑偡丅

拲堄両儔僀僽儔儕偺僀儞僗僩乕儖偺屻偵嵞僐儞僷僀儖傪峴側偆慜偵丄 
configure 傪憱傜偣捈偟偰 make clean 傪偟側偗傟偽側傜側偄偱偟傚偆丅 

1.5. backend 偺僐儞僷僀儖偑僀儞僋儖乕僪僼傽僀儖 dlfcn.h 偑尒偮偐傜側偄
偲偄偆偙偲偱廔傝傑偡丅

幙栤 1.3/1.4 偺夞摎傪屼棗壓偝偄丅傕偟丄a.out 偺僔僗僥儉傪偍巊偄偱偟偨傜
丄dlfcn.h 傪帩偮偨傔偵丄傑偢巒傔偵 dld 僷僢働乕僕乮傎偲傫偳偺 a.out 偺
僔僗僥儉偵晬懏偟偰側偄乯傪僀儞僗僩乕儖偟側偔偰偼側傜側偄偙偲傪偍朰傟偵
側傜側偄傛偆偵丅幙栤 1.11 傪屼棗壓偝偄丅 

1.6. GCC 偑僆僾僔儑儞 -fpic 傪柍帇偟偨偲傏傗偒傑偡丅

GCC 偺弶婜僶乕僕儑儞偼丄-fpic 偐 -fPIC 偐偺偳偪傜偐傪庴偗擖傟傑偡丅傛傝
嵟嬤偺僶乕僕儑儞 (V2.7.2?) 偱偼 -fPIC 傪梫媮偟傑偡丅 ELF 僶乕僕儑儞偺
Linux 傪偍巊偄偺応崌偼丄-fPIC 偑婛掕抣偲側傝傑偡偺偱丄偙偺偙偲偼柍帇偟
偰傕戝忎晇偱偡丅偙傟偼丄src/Makefile.global 傪曇廤偟丄 CFLAGS_SL 傪曄峏
偡傞偙偲偱掶惓偱偒傑偡丅 

1.7. 師偺傛偆側寈崘傪庴偗庢傝傑偡丗 warning: cast from pointer to
integer of different size

偙傟傜偼 Postgres95 偺弶婜僶乕僕儑儞偱尒庴偗傜傟傑偟偨偑丄柍帇偟偰傕戝
忎晇偱偡丅PostgreSQL V6.0 偱偼丄僔僗僥儉僿僢僟乕僼傽僀儖偵娭偡傞寈崘乮
偙傟傜傕埨慡偵柍帇偱偒傑偡乯埲奜偼丄寈崘柍偟偵僐儞僷僀儖偱偒傞偼偢偱偡
丅 

1.8. [SuSE-Linux 4.2-4.4] curses 偲 termcap 偼偳偙偵偁傝傑偡偐丠

SuSE-Linux 4.2 偵 ncurses 偼偁傝傑偡偑 curses 偼偁傝傑偣傫丅 4.4 偵偼椉
曽偁傝傑偡丅SuSE-Linux 偺 termcap 儔僀僽儔儕傕傑偨 /usr/lib 偺拞偱偼側
偔 /usr/lib/termcap 偺拞偵偁傝傑偡丅

 丒 PostgreSQL (up to V6.0)
   
    src/Makefile.custom 偺拞偱 CURSES_LIB 偺抣偵 -lncurses 傪愝掕偟傑偡
    乮偁傞偄偼僇僗僞儅僀僘僗僋儕僾僩傪捠偟偰峴側偄傑偡乯丅師偺峴傪 src/
    Makefile.custom 偵壛偊傑偡丗
   
    劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
    劆  LDADD_BE+= -L/usr/lib/termcap                         劆
    劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
   
    src/bin/psql/Makefile 傪曇廤偟偰師偺
   
    劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
    劆  ifeq ($(PORTNAME), linux)                             劆
    劆    LD_ADD+=                                            劆
    劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
   
    傪
   
    劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
    劆  ifeq ($(PORTNAME), linux)                             劆
    劆    LD_ADD+= -ltermcap                                  劆
    劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
   
    偵曄峏偟傑偡丅
   
 丒 PostgreSQL (V6.1)
   
    configure 僗僋儕僾僩偼 termcap 儔僀僽儔儕傪 /usr/lib/termcap 偺拞偵
    憑偡弍傪抦傝傑偣傫偺偱丄憑嶕偡傞捛壛僨傿儗僋僩儕傪恞偹傜傟偨偲偒偵
    丄偙偺僨傿儗僋僩儕傪巜掕偡傞僨傿儗僋僩儕偺堦偮偵娷傔傞傋偒偱偡丅
   
    傕偟丄偙傟偱偆傑偔備偐側偗傟偽乮挊幰偼偦傟傪妋偐傔傞偨傔偺 SuSE 傪
    帩偭偰偄傑偣傫乯丄configure 傪憱傜偣偨屻偵丄 src/Makefile.global 傪
    曇廤偟偰 LDFLAGS 偺峴(-lreadline 偺屻傠) 偵 -ltermcap 傪壛偊傑偡丅
    乮偁傞偄偼丄 configure 傪憱傜偣傞慜偵丄 src/Makefile.custom 傪廋惓
    偡傞偙偲傕偱偒傑偡丅乯
   
    -lcurses 傪 -lncurses 偵曄偊偰丄傓偟傠 curses 偺戙傢傝偵偁偊偰
    ncurses 傪巊偄偨偄偲婅偆偐傕抦傟傑偣傫 SuSE 偺偄偔偮偐偺僶乕僕儑儞
    偱偼 ncurses 偺傒偟偐採嫙偝傟傑偣傫偺偱丄-lcurses 傪 -lncurses 偵曄
    偊偰 curses 偺戙傢傝偵 ncurses 傪巊偆昁梫偑偁傞偐傕偟傟傑偣傫丅
    (SuSE 5.1 偱偼傑偝偵偦偺偙偲偑曬崘偝傟偰傑偡丅)
   
 

1.9. ld.so 偱栤戣偑弌傞偺偼側偤偱偟傚偆丠

ld.so 偱栤戣偑偁傟偽丄ELF 偺壓偱僟僀僫儈僢僋儘乕僨傿儞僌偺偨傔偵暿偺儔
僀僽儔儕偑梫媮偝傟傑偡丅偦傟偼丄Linux 偺僀儞僗僩乕儖偐乮偦傟偵嬤偄乯傾
僢僾僌儗乕僪偱曄偵偟偰偟傑偭偨偺偱偡丅

幙栤 1.3/1.4 偺夞摎傪屼棗壓偝偄丅ld.so.x.y.z 傪 /lib 偵僀儞僗僩乕儖偟偰
ldconfig 傪憱傜偣傞昁梫偑偁傞偐傕抦傟傑偣傫丅嵟傕嵟嬤偺 ld 偺僷僢働乕僕
偼 1.7.14 偱偡丅偙傟傪彂偄偰偄傞帪揰偱 ld 偺 1.8.x 僶乕僕儑儞偼幚尡斉偱
偡丅 

1.10. 'yy_flush_buffer undefined' 偲偄偆僄儔乕偑弌傞偺偼側偤偱偟傚偆丠

偙傟偼杮摉偵 Linux 偵尷偭偨偙偲偱偼偁傝傑偣傫偑丄屆偄 Linux 偺僀儞僗僩
乕儗僔儑儞偱偼椙偔偁傝傑偡丅PostgreSQL 傪僐儞僷僀儖偡傞偺偵 flex 偺嵟怴
斉(2.5.2埲崀)傪帩偭偰偄傞昁梫偑偁傝傑偡丅偨偩偟丄flex 2.5.3 偼僶僌偑偁
傝傑偡丗幙栤 3.4 傪嶲徠壓偝偄丅 

1.11. a.out 僔僗僥儉偱偼 PostgreSQL 傪偳偺傛偆偵僐儞僷僀儖偟傑偡偐丠

嵟弶偵丄dld 儔僀僽儔儕傪僀儞僗僩乕儖偟側偔偰偼側傝傑偣傫丅偙傟偼丄
Sunsite: LINUX/libs/dld.3.2.7.tar.gz

 丒 ftp://sunsite.unc.edu/pub/Linux/libs/dld.3.2.7.tar.gz
   
偐傜擖庤偱偒傑偡丅

戞擇偵丄師偺峴丗
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  LINUX_ELF=                                                        劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
傪 src/Makefile.custom 偵壛偊傑偡丅乮偁傞偄偼僇僗僞儅僀僘僗僋儕僾僩傪巊
偄傑偡乯 

1.12. 師偺傛偆偵 make 偑幐攕偡傞偺偼側偤偱偡偐丗 yacc -d /disk2/
PostgreSQL/src/backend/parser/gram.y make: /usr/bin/make: cannot
execute binary file

偙傟偼丄Postgres95 偺弶婜僶乕僕儑儞偺栤戣偱偟偨丅PostgreSQL 偺偨傔偺婛
掕抣偼 yacc 偱偼側偔 bison -y 傪巊偆傛偆偵側偭偰傑偡丅 yacc 偼堦斒揑偵 
bison -y 偵傛偭偰婲摦偝傟傞僗僋儕僾僩偲偟偰幚憰偝傟偰偄傑偡丅偁傞棟桼偱
乮make 偺偁傞僶乕僕儑儞丠bash 偺偁傞僶乕僕儑儞丠乯make 偑偙偺僗僋儕僾僩
僼傽僀儖傪幚峴偱偒傑偣傫丅

偙傟傪捈偡偵偼丄扨弮偵 src/mk/port/postgres.mk.linux 傪曇廤偟偰丄偦偺僼
傽僀儖偺廔傝偺
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  # YACC = bison -y                                                 劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
傪
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  YACC = bison -y                                                   劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
偵曄峏偟傑偡丅 

1.13. src/Makefile.global 偺拞偱 X11_LIB 偺 libsocket 偲 libnsl 傊偺嶲
徠偼壗偱偡偐丠

偙傟偼 1.08 偱偺乮Sun Solaris 偵摿桳偺乯栤戣偱偟偨丅1.09 偲 6.0偱偼捈偭
偰偄傑偡丅 

1.14. [DEBIAN] libtermcap 偼偳偙偵偁傝傑偡偐丠

Debian Linux 偵偼 termcap 儔僀僽儔儕偼晅偄偰偙側偔偰丄乮偦偺戙傢傝偵
terminfo 傪巊偆乯 ncurses 傪巊偄傑偡丅Debian 偼乮SuSE-Linux 偲偼堘偄
--- 幙栤 1.8 傪屼棗壓偝偄乯 libncurses 偐傜 libcurses 傊偺儕儞僋傪梡堄
偟偰傑偡偺偱 src/bin/psql/Makefile 偺拞偺 CURSES_LIB 曄悢偼曄峏偡傞昁梫
偼偁傝傑偣傫丅

src/bin/psql/Makefile 傪曇廤偟偰丄
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  ifeq ($(PORTNAME), linux)                                         劆
劆     LD_ADD+= -ltermcap                                             劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
偐傜
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  ifeq ($(PORTNAME), linux)                                         劆
劆    LD_ADD+=                                                        劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
傊曄峏傪僐儊儞僩偱奜偡昁梫偑偁傞偐傕偟傟傑偣傫丅 

1.15. [REDHAT] RPM 偱偺 PostgreSQL 偼庤偵擖傝傑偡偐丠

偁傝傑偡丅Michal Mosiewicz 偝傫偑 (http://www.pdi.lodz.pl/~mimo) Intel
斉偺 PostgreSQL V6.0 傪偛恊愗偵 RPM 偵傑偲傔偰偔傟傑偟偨丅偦偟偰丄

 丒 ftp://ftp.redhat.org/pub/Incoming/Postgres-6.0-1.i386.rpm
   
偵傾僢僾儘乕僪偝傟偰偄傑偡丅

偙傟偼丄僐儞僷僀儖嵪僶乕僕儑儞偱丄偦偙偵偁傞僜乕僗偺 RPM 偼挊幰偑彂偒傑
偟偨丅 

1.16. Linux 偱奐敪僶乕僕儑儞傪僐儞僷僀儖偟傛偆偲偟偨傜丄師偺傛偆側儊僢
僙乕僕偱幐攕偟傑偟偨丗 In file included from /usr/include/sys/sem.h:8,
from ipc.c:37: /usr/include/asm/bitops.h:32: warning: no previous
prototype for Set_bit' .... make: *** [ipc.o] Error 1

栤戣偼 Linux 偑偙傟傜偺僀儞儔僀儞娭悢偺偨傔偺僾儘僩僞僀僾傪梡堄偟偰偄側
偄偙偲偱偡丅夝寛嶔偼 .../src/backend/storage/ipc 僨傿儗僋僩儕偵峴偭偰
Makefile 傪曇廤偡傞偙偲偱偡丅

師偺峴丄

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  CFLAGS+=$(INCLUDE_OPT)                                            劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

傪

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  CFLAGS+=$(INCLUDE_OPT) -Wno-error                                 劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

偵曄峏偟傑偡丅

../src/backend/storage/lmgr 僨傿儗僋僩儕偵偮偄偰傕摨條偵偟傑偡丅 

1.17. postgres 傪僐儞僷僀儖偡傞偲偒丄gcc 偑 signal 11 傪弌偟偰棊偭偙偪
傑偟偨丅 gcc: Internal compiler error: program cc1 got fatal signal 11

偙傟偼丄僴乕僪僂僃傾乛儊儌儕偺栤戣偱偡丅PostgreSQL 偼戝偒側僾儘僌儔儉偱
偡偺偱丄乮PostgreSQL 傪峔抸偟偨傝丄僇乕僱儖傪峔抸偟偨傝偡傞傛偆側乯嫄戝
側 gcc 偺僐儞僷僀儖偵偍偄偰偼丄懠偺婔偮偐偺僾儘僌儔儉偺傛偆偵儊儌儕傪埑
敆偟丄偦偺寢壥捠忢憖嶌偱偼婲偒側偄僄儔乕偵廔傝傑偡丅傛傝彫偝側婎杮僜僼
僩偱傕偁傝傑偡偑丄偙偺傛偆側搙崌偵傑偱偼僴乕僪僂僃傾傪埑敆偟傑偣傫偺偱
丄DOS/Windows 偺壓偱偼偙偺傛偆側栤戣偵崌偆偙偲偼柍偄偐傕抦傟傑偣傫丅

傛傝徻嵶側忣曬偼丗

 丒 http://www.bitwizard.nl/sig11
   
偵偁傝傑偡丅

偙偺 Sig11 FAQ 偵傛傞偲丄Cyrix 僾儘僙僢僒忋偱偺 Redhad 5.0 gcc 傪憱傜偣
傞帪偺摿暿側栤戣偑偁傞傛偆偱偡丅徻嵶偼忋婰偺 URL 傪屼棗壓偝偄丅 

1.18. MkLinux 偱 6.1.1 傪僀儞僗僩乕儖偱偒傑偡偐丠

愇堜払晇偝傫偑 MkLinux DR2.1 update2 埲崀偱峴側偄傑偟偨丅彫偝側僷僢僠偼
丗

 丒 ftp://ftp.sra.co.jp/pub/cmd/postgres/6.1.1/mklinux.patch.gz
   
偐傜擖庤偱偒傑偡丅

[栿拲 6.2 偐傜偼僷僢僠偼昁梫側偔側傝傑偟偨丅 ] 

1.19. 儊僀僋偑廔偭偨傝丄僋儔僢僔儏偡傞偺偼偳偆偟偰丠

gmake 偑憗乆偵廔偭偨傝椞堟怤奞偱棊偪偨傝偡傞偙偲偑婔偮偐曬崘偝傟偰偄傑
偡丅屻幰偺栤戣偼 gmake 3.74 偱曬崘偝傟偨傕偺偱丄3.76.1 偵傾僢僾僌儗乕僪
偡傞偙偲偱夝寛偝傟傑偟偨丅偲偙傠偑丄3.74 偼懠偺恖乆偺僙僢僩傾僢僾偱偼惓
忢偵摦偄偰偄傞偙偲偑抦傜傟偰偄傑偡丅偲傝偁偊偢偼丄偙偺栤戣偵偮偄偰曬崘
傪峴側偆慜偵丄gmake 傪嵟怴斉偵傾僢僾僌儗乕僪偟偰傒偰偔偩偝偄丅 

1.20. 486 傗 Pentium 僾儘僙僢僒梡偺嵟揔壔偼偳偺傛偆偵偡傞偺偱偡偐丠

僨僼僅儖僩偺僐儞僷僀儔丒僼儔僌偱偼 486 傗 Pentium 僾儘僙僢僒乕偺偨傔偺
嵟揔壔偼峴側偄傑偣傫丅偙偺傛偆側嵟揔壔傪壛偊傞偵偼丄 Makefile.custom 傪
曇廤偟偰丗

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  CFLAGS+= -m486                                                    劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
傑偨偼丄(傑偩丄偁傑傝憱傜偣偰偄傞恖偺偄側偄怴偟偄僐儞僷僀儔偱偼)
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  CFLAGS+= -mpentium                                                劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
傑偨偼
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  CFLAGS+= -mpentiumpro                                             劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

傪壛偊傑偡丅 

1.21. 帪娫傪報嶞偟傛偆偲偡傞偲偳偆偟偰曄側寢壥偵側傞偺偱偡偐 (椺偊偽丄
regression 僥僗僩偺 'timespan)丠帪娫偼丄'5 hours' 偺偐傢傝偵 ' 4 hours
59 mins 60.00 secs' 偺傛偆偵側傝傑偡丅

偙偺栤戣偼 Redhat 5.0 偵娷傑傟偰偔傞 glibc2 偱偺栤戣偱偡丅glibc 傪嵟怴
偺 v5.0/hurricane 偺 RedHat 僶乕僕儑儞偵傾僢僾僨乕僩偟偰壓偝偄丅
glibc-2.0.7 傛傝慜偺傕偺偼栤戣偑傛偔偁傞傛偆偱偡丅 

1.22. 6.3.2 傪僐儞僷僀儖偟偨帪偵 libpq 偺偨傔偺嫟桳儔僀僽儔儕偑偱偒側偄
偺偼側偤偱偡偐丠

v6.3.2 偺偨傔偺 Linux 僐儞僼傿僌儗乕僔儑儞偼廔傞悺慜偱棧扙傪偍偙偟偰傑
偟偨丅ftp://postgresql.org/pub/patches/ 偵 linux_elf 僷僢僠傪娷傓婔偮偐
偺廋惓偑忋偑偭偰偄傑偡偺偱尒偰壓偝偄丅  

1.23. 僐儞僷僀儖偑 F_BOOLIN, F_BOOLOUT 偍傛傃 F_BYTEAIN 偑枹掕媊偱偁傞
偲偺儊僢僙乕僕偱幐攕偡傞偺偼側偤偱偡偐丠

幚嵺偺儊僢僙乕僕偼埲壓偺傛偆側傕偺偱偡:

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  -I/usr/include/readline -O2 -Wall -Wmissing-prototypes -I..         劆
劆  -Wno-error -c bootstrap.c -o bootstrap.o                            劆
劆  bootstrap.c:160: `F_BOOLIN' undeclared here (not in a function)     劆
劆  bootstrap.c:160: initializer element for `Procid[0].inproc' is not  劆
劆  constant                                                            劆
劆  bootstrap.c:160: `F_BOOLOUT' undeclared here (not in a function)    劆
劆  bootstrap.c:160: initializer element for `Procid[0].outproc' is not 劆
劆  constant                                                            劆
劆  bootstrap.c:161: `F_BYTEAIN' undeclared here (not in a function)    劆
劆  bootstrap.c:161: initializer element for `Procid[1].inproc' is not  劆
劆  constant                                                            劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

偙傟傜偺掕悢偼偳偙偵傕掕媊偝傟偰偄偦偆傕柍偄偺偱丄側偤偦傟偑婲偙傞偐傪
抦傜側偗傟偽丄偙傟偼婏柇側偙偲偱偡丅

偦偺摎偊偼丄儊僀僋傪巒傔傞慜偵 cpp 偑僷僗偵偁傞偙偲傪妋擣偡傞偙偲偱偡丅

Redhat 5.1 偱偼丄cpp 偼 /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3 偵偁
傝傑偡丅

2. 晬懏僾儘僌儔儉偺僐儞僷僀儖

2.1. pgtclsh 傪僐儞僷僀儖偡傞帪丄儕儞僇偑 libX11 傪憑偣傑偣傫丅

師偺峴傪 src/Makefile.custom 偵壛偊偰壓偝偄丅

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  X11_LIBDIR = /usr/X11R6/lib                                       劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

3. 幚峴帪偺栤戣

3.1. createuser 側偳偺僗僋儕僾僩傪憱傜偣傞帪丄 _fUnKy_POSTPORT_sTuFf_
偑枹掕媊偲偺僄儔乕曬崘傪庴偗庢傝傑偡丅

偙傟偼丄Postgres 偺 V1.06-V1.07 偱偺僶僌偱 V1.08 埲忋偱偼捈偭偰偄傑偡丅

3.2. postmaster 傪憱傜偣偨屻丄僔僗僥儉偑 ' Bad system call(Core dumped)
' 偲尵偄傑偡丅

偙傟偼丄嫟桳儊儌儕偺僒億乕僩傪慻傒崬傑側偄偱僇乕僱儖偺僐儞僷僀儖傪偟偰
偟傑偭偨偙偲傪帵偟傑偡丅Linux 僇乕僱儖偵偙偺婡擻傪慻傒崬傫偱僐儞僷僀儖
偟捈偡昁梫偑偁傝傑偡丅 

3.3. postmaster 傪憱傜偣傛偆偲偡傞帪丄師偺傛偆側僄儔乕傪庴偗庢傞偺偼側
偤偱偡偐丠
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  Failed Assertion("!(file != 0):(null)", File:                     劆
劆  "/usr/local/PostgreSQL/src/backend/storage/file/fd.c", Line: 257) 劆
劆  !(file != 0) (0)                                                  劆
劆  initdb: could not create template database                        劆
劆  initdb: cleaning up.                                              劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

/dev/null 僼傽僀儖偺傾僋僙僗尃偑娫堘偭偰偄傑偡丅

ls -l /dev/null 偱師偺傛偆偵:

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  crw-rw-rw-  1 root  wheel    2,   2 Oct  8 18:41 /dev/null        劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

昞帵偝傟傞傋偒偱偡丅

師偺僐儅儞僪偱:

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  chmod a+rw /dev/null                                              劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

傾僋僙僗尃傪掶惓偟偰偔偩偝偄丅 

3.4. createuser 偑摦偐側偄偺偼側偤偱偡偐丠

GNU flex 偺僶乕僕儑儞 2.5.3 偲 createuser 偱栤戣偑偁傝傑偡丅 V2.5.2 偵
僟僂儞僌儗乕僪偡傞偐丄V2.5.4 偵傾僢僾僌儗乕僪偡傞偐丄偁傞偄偼丄V2.5.3
偵 doc/README.flex 偱採嫙偝傟傞僷僢僠傪巤偟偰壓偝偄丅V2.5.4 偼:

 丒 ftp://prep.ai.mit.edu/pub/gnu/flex-2.5.4.tar.gz
   
偐傜擖庤偱偒傑偡丅 

3.5. 師偺傛偆側僄儔乕傪庴偗庢傞偺偼側偤偱偡偐丗
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  IpcMemoryCreate: memKey=155356396 , size=760632 ,                 劆
劆  permission=384IpcMemoryCreate: shmget(..., create, ...)           劆
劆  failed: Invalid argument                                          劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

Linux 僇乕僱儖偵 IPC 僒億乕僩偺慻傒崬傒傪偟偰偄傑偣傫丅偙偺僆僾僔儑儞傪
惗偐偟偰丄僇乕僱儖傪峔抸偟捈偡昁梫偑偁傞偱偟傚偆丅 

3.6. 偳偆偟偰丄psql 偑師偺傛偆偵幐攕偡傞偺偱偡偐丗 'psql: can't load
library 'libpq.so.1'

psql 偼 libpq 儔僀僽儔儕偵摦揑偵寢崌偡傞傛偆偵僐儞僷僀儖偝傟偰偄傑偡丅

偙傟傪夝寛偡傞偵偼丄root 偱儘僌僀儞偟偰丄僼傽僀儖
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  /etc/ld.so.conf                                                   劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

傪曇廤偟傑偡丅PostgreSQL 儔僀僽儔儕偺僨傿儗僋僩儕(PostgreSQL 傪僀儞僗僩
乕儖偟偨偲偙傠偺 lib 僒僽僨傿儗僋僩儕) 偺柤慜傪偦偺僼傽僀儖偺廔傝偵堦峴
壛偊傑偡丅偦偆偟偰丄
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  /sbin/ldconfig -v                                                 劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

傪憱傜偣傑偡丅

偁傞偄偼丄(傕偟丄root 偵側傟側偗傟偽)丄LD_LIBRARY_PATH 娐嫬曄悢傪巊偭偰
傕峔偄傑偣傫丅

LD_LIBRARY_PATH 娐嫬曄悢偼丄嫟桳儔僀僽儔儕偑憑偝傟傞僷僗傪僐儘儞偱嬫愗
偭偨偨儕僗僩偱偡丅偙偺儕僗僩偼丄ldconfig 偵傛傝巜掕偝傟偨儔僀僽儔儕偺慜
偵憑偝傟傑偡丅

偙偺巜掕偼丄bash 偱偼:
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  export LD_LIBRARY_PATH='PathToPGSQL'/lib                          劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

偺傛偆偵偟丄傑偨丄tcsh 傪巊偭偰偄傞応崌偼:
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  setenv LD_LIBRARY_PATH 'PathToPGSQL'/lib                          劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

偲偟偰丄'PathToPGSQL' 傪揔愗側 PostgreSQL 偺嵟忋晹偺僷僗偵抲偒姺偊傑偡
丅

ldd 僐儅儞僪偼摦揑寢崌偺幚峴儌僕儏乕儖偵偦偺幚峴儌僕儏乕儖偑埶懚偟偰偄
傞偡傋偰偺嫟桳儔僀僽儔儕偺僷僗傪儕僗僩偡傞偺偵巊偆偙偲偑偱偒傞偙偲偵拲
堄偟偰壓偝偄丅 

3.7. 偦偺懠偺婏柇側怳晳丅

慡偔摦嶌偟側偄帪埲奜偵偳傫側挍岓偲側傞偐偼傢偐傝傑偣傫偑丄摦揑儘乕僟偑
libpq 儔僀僽儔儕偺惓偟偄僶乕僕儑儞傪儘乕僪偡傞偙偲偵拲堄傪暐偆昁梫偑偁
傞偙偲偩偗偼柧傜偐偱偡丅傕偟丄屆偄僶乕僕儑儞偑儔僀僽儔儕僷僗(椺偊偽丄/
usr/lib)偺偳偙偐偵偁傞偲丄儘乕僪偡傞偮傕傝偺怴偟偄僶乕僕儑儞偺偐傢傝偵
儘乕僪偝傟偰偟傑偆偐傕偟傟傑偣傫丅屆偄僶乕僕儑儞偑僷僗偵側偄偺傪妋偐傔
傞偲偲傕偵丄Q3.6 偺儔僀僽儔儕偺儘乕僪偵偮偄偰偺徻嵶傪尒偰壓偝偄丅 

3.8. PostgreSQL 偑憱偭偰偄傞帪偵僔僗僥儉傪僔儍僢僩僟僂儞偡傞偲丄 Linux
偼儕僽乕僩偺帪偵偄偮傕僨傿僗僋傪 fsck 偟傑偡丅

偙偺帠椺偑婔偮偐曬崘偝傟偰偄傑偡偑丄偦傟偼 INSTALL 僪僉儏儊僩偺採埬偵廬
偭偰 /etc/inittab 偐傜 PostgreSQL 傪憱傜偣偨寢壥偺傛偆偵尒庴偗傜傟傑偡
丅

偱偡偺偱丄postmaster 傪 rc 僗僋儕僾僩偐傜巒摦偡傞偙偲傪偍姪傔偟傑偡丅
Slackware宯偺儕儕乕僗偱偼丄 /etc/rc.d/rc.local 傪廋惓偟偰 postmaster 傪
巒摦偡傞偲椙偄偱偟傚偆丅 RedHat宯偺儕儕乕僗偱偼丄 SysV 僗僞僀儖偺僗僋儕
僾僩傪 /etc/rc.d/init.d 榞慻僼傽僀儖傪婎偵 /etc/rc.d/rc3.d 偵嶌傞傋偒偱
偡丅

僼傽僀儖偺椺偑 contrib/linux/postgres.init 偵偁傝傑偡丅

偙偙偵傕丄昁梫偵墳偠偰廋惓偡傋偒偱偡偑丄John Robinson 偑採嫙偡傞丄傕偆
堦偮偺僼傽僀儖偺椺偑偁傝傑偡丅
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  #!/bin/sh                                                               劆
劆  #                                                                       劆
劆  # postgreSQL.init This shell script takes care of starting and stopping 劆
劆  #               the PostgreSQL postmaster.                              劆
劆  #                                                                       劆
劆                                                                          劆
劆  # Source function library.                                              劆
劆  . /etc/rc.d/init.d/functions                                            劆
劆                                                                          劆
劆  # Source networking configuration.                                      劆
劆  . /etc/sysconfig/network                                                劆
劆                                                                          劆
劆  # Check that networking is up.                                          劆
劆  [ ${NETWORKING} = "no" ] && exit 0                                      劆
劆                                                                          劆
劆  # See how we were called.                                               劆
劆  case "$1" in                                                            劆
劆    start)                                                                劆
劆          # Start daemons.                                                劆
劆          echo -n "Starting postgres Postmaster daemon:"                  劆
劆          if [ -z "`pidofproc postmaster`" ]                              劆
劆          then                                                            劆
劆                  su postgres -c "/usr/local/pgsql/bin/postmaster \       劆
劆                              -D /home/postgreSQL/data -p 5432 &"         劆
劆                  echo -n " postmaster"                                   劆
劆          else                                                            劆
劆                  echo -n " (already running)"                            劆
劆          fi                                                              劆
劆          echo                                                            劆
劆          touch /var/lock/subsys/postgres                                 劆
劆          ;;                                                              劆
劆    stop)                                                                 劆
劆          # Stop daemons.                                                 劆
劆          echo -n "Shutting down postgres Postmaster daemon: "            劆
劆          killall -TERM postmaster 2>/dev/null                            劆
劆          killall -TERM postgres 2>/dev/null                              劆
劆          echo                                                            劆
劆          rm -f /var/lock/subsys/postgres                                 劆
劆          ;;                                                              劆
劆    *)                                                                    劆
劆          echo "Usage: postgres {start|stop}"                             劆
劆          exit 1                                                          劆
劆  esac                                                                    劆
劆                                                                          劆
劆  exit 0                                                                  劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
 

3.9. regression 僥僗僩偺栤偄崌傢偣 32 偵偲偰傕帪娫偑偐偐傞偺偼側偤偱偡
偐?

偙傟偼丄linux 儅僔儞偱偺傒婲偒傞 regression 僗僋儕僾僩偺僶僌偵傛傞傕偺
偱偡丅巹偺抦傞尷傝偱偼丄(愇堜払晇偝傫偐傜偺忣曬偵傛傞偲):

 1. regress.sh 偺拞偱師偺:
    劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
    劆  time postgres -texecutor -tplanner -Q bench < bench.sql 劆
    劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
    傪
    劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
    劆  postgres -texecutor -tplanner -Q bench < bench.sql    劆
    劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
   
    偵曄偊傞丅
   
 2. 僥僗僩傪憱傜偣偨屻偱丄bench.out 偺廔傝偵嬤偄丄偨偲偊偽師偺傛偆側峴:
    劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
    劆  85.86user 114.47system 4:49.20elapsed 69%CPU (0avgtext+0avgdata 0maxresident)k劆
    劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
   
    傪庢傝彍偄偰偐傜丄
   
    劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
    劆  sh ./perquery < bench.out > & bench.out.perquery      劆
    劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
    傪幚峴偟傑偡丅
   
 

3.10. 偁傞 date/time 偺墘嶼偱丄埲壓偺傛偆側柇側娵傔偲側傞偺偼側偤偱偡偐
丠

2.0.7 傛傝傕慜偺怴 glibc2 傪憱傜偣偰偄傑偡偹丅儔僀僽儔儕傪傾僢僾僨乕僩
偟偰壓偝偄丅 

(sgml conversion, y.senda, ysenda@pop01.odn.ne.jp, 2001/09)

