[pgsql-jp: 26236] Postgres7.2.1 のインストールに成功しました
dolphine @ axel.ocn.ne.jp
dolphine @ axel.ocn.ne.jp
2002年 6月 2日 (日) 06:47:47 JST
大場さん いろいろ参考になります。ありがとうございます。
>また、既存のdata/以下があると確かinitdbできませんので
>このファイルは書き換わりません。
>じゃ、これを書き換えればいいかというとそれだけの問題ではなくて
>バージョンによってはデータベースの作り方も違ってるので
>旧バージョンのデータを格納したファイルが
>新バージョンでは読めないってこともあります。
>ですから、7.xのxが違ってる場合は上書きしちゃ「絶対にダメ」です。
>大雑把な流れは以下のようにします。
>通常はデータのバックアップ
>旧バージョンの停止
>旧バージョンのディレクトリ名を変更
>新バージョンの通常のインストール
>initdb
>動かす
>データのリストア
>
それとドキュメントも読もうと思っています。
自分の力量では、よく原因がわからなかったのでLINUXのOSを
再インストールし直して、高田さんも指摘されていた 7.2.1の
postgresをmake しました。(pqsl もできました。)
[postgres @ localhost bin]$ initdb
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
creating 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
creating template1 database in /usr/local/pgsql/data/base/1... ok
creating configuration files... ok
initializing pg_shadow... ok
enabling unlimited row size for system tables... ok
creating system views... ok
loading pg_description... ok
vacuuming database template1... ok
copying template1 to template0... ok
Success. You can now start the database server using:
/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data
or
/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start
[postgres @ localhost bin]$ postmaster -S -i
[postgres @ localhost bin]$ createdb test
CREATE DATABASE
[postgres @ localhost bin]$ psql test
Welcome to psql, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit
test=# create table test(i int);
CREATE
test=# insert int test values(100);
ERROR: parser: parse error at or near "int"
test=# insert into test values(100);
INSERT 16559 1
test=# select * from test;
i
-----
100
(1 row)
test=# \q
[postgres @ localhost bin]$ dropdb test
DROP DATABASE
[postgres @ localhost bin]$
となり
PostgreSQLのインストールに成功しました。ここまでくるまでに会員の皆様には
ゴミメールを送ってしまい申し訳ありませんでした。
今後は、telnet 等(いまsambaでの セットアップを試みています)で簡潔、明瞭に
実験結果を報告したいと考えている次第です。本当に素早い返答に感謝しております。
今後とも宜しくお願い申しあげます。
pgsql-jp メーリングリストの案内