[pgsql-jp: 36138] Re: psqlメタコマンドとトランザクション
Kiyoshi Mizuno
kiyoshi_mizuno @ mail.toyota.co.jp
2005年 10月 14日 (金) 11:04:07 JST
水野です。
> -----Original Message-----
> 石井です.
(中略)
> > 【実験 その1】
> > −−−−ここから−−−−ここから−−−−
> > template1=# begin ←”;”なしでbeginをタイプ
> > template1-# \d ←メタコマンド実行
> > リレーションの一覧
> > スキーマ | 名前 | 型 | 所有者
> > ----------+------------------+----------+----------
> > public | geometry_columns | テーブル | postgres
> > public | pg_logdir_ls | ビュー | postgres
> > public | spatial_ref_sys | テーブル | postgres
> > (3 行)
> >
> > template1-# ; ←beginを完結させる目的で”;”をタイプ
> > WARNING: there is already a transaction in progress
> > BEGIN ↑もう始まった事になっている
>
> これ,おかしいですね.もしかして,
>
> \set AUTOCOMMIT off
>
> とかしてませんか?
いえ、やってないです。
この検証用に自分のPC(今メールを書いているこのマシン)に
8.0.3を新規でバイナリインストールし、デフォルト設定のまま
スタートメニューの「psql で template1 へ接続」でDBに接続して
上記一連の操作を行いました。
今も確認しましたが、AUTOCOMMIT = 'on'です。
で、気になったのでもう一度やってみたところ、
12日と動きが変わってます・・・(下記)
−−−−ここから−−−−ここから−−−−
パスワード:
PostgreSQL の会話型ターミナル、psql 8.0.3 for windows へようこそ
Type: \copyright とタイプすると、配布条件を表示します。
\h とタイプすると、SQL コマンドのヘルプを表示します。
\? とタイプすると、内部スラッシュコマンドのヘルプを表示します。
\g と打つかセミコロンで閉じると、クエリーを実行します。
\q で終了します。
template1=# begin
template1-# \d
リレーションの一覧
スキーマ | 名前 | 型 | 所有者
----------+------------------+----------+----------
public | geometry_columns | テーブル | postgres
public | pg_logdir_ls | ビュー | postgres
public | spatial_ref_sys | テーブル | postgres
(3 行)
template1-# ;
BEGIN
template1=#
−−−−ここまで−−−−ここまで−−−−
これが正しい動きですよね。
長くなりますが、12日のログを添付します。
インストールしたのが12日なのでこれ以前のログは存在しません。
2005-10-12 16:17:17 LOG: database system was shut down at 2005-10-12 16:17:11 JST
2005-10-12 16:17:17 LOG: checkpoint record is at 0/AC3270
2005-10-12 16:17:17 LOG: redo record is at 0/AC3270; undo record is at 0/0; shutdown TRUE
2005-10-12 16:17:17 LOG: next transaction ID: 546; next OID: 17230
2005-10-12 16:17:17 LOG: database system is ready
2005-10-12 16:17:22 WARNING: there is already a transaction in progress
2005-10-12 16:17:22 NOTICE: type "histogram2d" is not yet defined
2005-10-12 16:17:22 DETAIL: Creating a shell type definition.
2005-10-12 16:17:23 NOTICE: argument type histogram2d is only a shell
2005-10-12 16:17:23 NOTICE: type "box3d" is not yet defined
2005-10-12 16:17:23 DETAIL: Creating a shell type definition.
2005-10-12 16:17:23 NOTICE: argument type box3d is only a shell
2005-10-12 16:17:23 NOTICE: type "spheroid" is not yet defined
2005-10-12 16:17:23 DETAIL: Creating a shell type definition.
2005-10-12 16:17:23 NOTICE: argument type spheroid is only a shell
2005-10-12 16:17:23 NOTICE: type "wkb" is not yet defined
2005-10-12 16:17:23 DETAIL: Creating a shell type definition.
2005-10-12 16:17:23 NOTICE: argument type wkb is only a shell
2005-10-12 16:17:23 NOTICE: return type wkb is only a shell
2005-10-12 16:17:23 NOTICE: argument type wkb is only a shell
2005-10-12 16:17:23 NOTICE: type "chip" is not yet defined
2005-10-12 16:17:23 DETAIL: Creating a shell type definition.
2005-10-12 16:17:23 NOTICE: argument type chip is only a shell
2005-10-12 16:17:23 NOTICE: type "geometry" is not yet defined
2005-10-12 16:17:23 DETAIL: Creating a shell type definition.
2005-10-12 16:17:23 NOTICE: argument type geometry is only a shell
2005-10-12 16:17:23 NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "spatial_ref_sys_pkey" for table
"spatial_ref_sys"
2005-10-12 16:17:23 NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "geometry_columns_pk" for table
"geometry_columns"
2005-10-12 16:17:24 WARNING: there is no transaction in progress
2005-10-12 16:17:24 WARNING: there is already a transaction in progress
2005-10-12 16:17:27 WARNING: there is no transaction in progress
2005-10-12 16:29:37 ERROR: syntax error at or near "be" at character 1
2005-10-12 16:30:13 ERROR: syntax error at or near "select" at character 7
2005-10-12 16:31:12 ERROR: current transaction is aborted, commands ignored until end of transaction block
2005-10-12 16:32:19 ERROR: current transaction is aborted, commands ignored until end of transaction block
2005-10-12 16:33:05 ERROR: current transaction is aborted, commands ignored until end of transaction block
2005-10-12 16:33:08 ERROR: current transaction is aborted, commands ignored until end of transaction block
2005-10-12 16:34:13 WARNING: there is already a transaction in progress
2005-10-12 16:38:15 ERROR: syntax error at or near "select" at character 7
2005-10-12 16:46:23 WARNING: there is no transaction in progress
2005-10-12 16:46:40 ERROR: syntax error at or near "select" at character 7
2005-10-12 16:47:15 WARNING: there is no transaction in progress
2005-10-12 19:24:18 LOG: received fast shutdown request
2005-10-12 19:24:19 LOG: shutting down
2005-10-12 19:24:19 LOG: database system is shut down
2005-10-12 19:24:22 LOG: logger shutting down
pgsql-jp メーリングリストの案内