[pgsql-jp: 36139] Re: pg_clog ディレクトリ内のログが参照できずPANIC

松本 貴臣 matsumoto_takaomi @ nextcom.co.jp
2005年 10月 14日 (金) 11:23:16 JST


松本です。
早速のご回答ありがとうございます。

> ・もう誰も使わないと判断されたCLOGファイルはVACUUMで削除される
> という流れで、VACUUMによりCLOGが削除されたのだと思います。

やはり、そうですよね・・・・。
しかし、以下のようにもう誰も使わないはずの「001B」ディレクトリを
なぜか参照しに行く動きを取りつづけています。
#特定のユーザが特定の処理を行う場合にPanic発生となります。

冗長かもしれませんが、念の為ログを掲載させて頂きました。

以上、よろしくお願いいたします。

=========================================================================
postgres[29640]: [16] PANIC:  open of /home/postgres/data/pg_clog/001B
failed: そのようなファイルやディレクトリはありません
postgres[29640]: [17-1] LOG:  statement: SELECT a,b FROM tbl WHERE a =
'hoge'
postgres[2279]: [10] LOG:  server process (pid 29640) was terminated by
signal 6
postgres[2279]: [11] LOG:  terminating any other active server processes
postgres[29643]: [13-1] WARNING:  Message from PostgreSQL backend:
postgres[29643]: [13-2] ^IThe Postmaster has informed me that some other
backend
postgres[29639]: [13-1] WARNING:  Message from PostgreSQL backend:
postgres[29643]: [13-3] ^Idied abnormally and possibly corrupted shared
memory.
postgres[29639]: [13-2] ^IThe Postmaster has informed me that some other
backend
postgres[29643]: [13-4] ^II have rolled back the current transaction and am
postgres[29639]: [13-3] ^Idied abnormally and possibly corrupted shared
memory.
postgres[29643]: [13-5] ^Igoing to terminate your database system
connection and exit.
postgres[29644]: [12-1] WARNING:  Message from PostgreSQL backend:
postgres[29642]: [12-1] WARNING:  Message from PostgreSQL backend:
postgres[29633]: [48-1] WARNING:  Message from PostgreSQL backend:
postgres[29639]: [13-4] ^II have rolled back the current transaction and am
postgres[29643]: [13-6] ^IPlease reconnect to the database system and
repeat your query.
postgres[29644]: [12-2] ^IThe Postmaster has informed me that some other
backend
postgres[29642]: [12-2] ^IThe Postmaster has informed me that some other
backend
postgres[29633]: [48-2] ^IThe Postmaster has informed me that some other
backend
postgres[29639]: [13-5] ^Igoing to terminate your database system
connection and exit.
postgres[29644]: [12-3] ^Idied abnormally and possibly corrupted shared
memory.
postgres[29642]: [12-3] ^Idied abnormally and possibly corrupted shared
memory.
postgres[29633]: [48-3] ^Idied abnormally and possibly corrupted shared
memory.
postgres[29639]: [13-6] ^IPlease reconnect to the database system and
repeat your query.
postgres[29644]: [12-4] ^II have rolled back the current transaction and am
postgres[29642]: [12-4] ^II have rolled back the current transaction and am
postgres[29633]: [48-4] ^II have rolled back the current transaction and am
postgres[29644]: [12-5] ^Igoing to terminate your database system
connection and exit.
postgres[29642]: [12-5] ^Igoing to terminate your database system
connection and exit.
postgres[29633]: [48-5] ^Igoing to terminate your database system
connection and exit.
postgres[29644]: [12-6] ^IPlease reconnect to the database system and
repeat your query.
postgres[29642]: [12-6] ^IPlease reconnect to the database system and
repeat your query.
postgres[29633]: [48-6] ^IPlease reconnect to the database system and
repeat your query.
postgres[2279]: [12] LOG:  all server processes terminated;
reinitializing shared memory and semaphores
postgres[29646]: [13] LOG:  connection received: host=192.168.0.1 port=47523
postgres[29646]: [14] FATAL:  The database system is starting up
postgres[29645]: [13] LOG:  database system was interrupted at
2005-10-13 09:14:31 JST
postgres[29645]: [14] LOG:  checkpoint record is at 286/78C4E910
postgres[29645]: [15] LOG:  redo record is at 286/78C4E910; undo record
is at 0/0; shutdown TRUE
postgres[29645]: [16] LOG:  next transaction id: 30058401; next oid: 3695345
postgres[29645]: [17] LOG:  database system was not properly shut down;
automatic recovery in progress
postgres[29645]: [18] LOG:  redo starts at 286/78C4E950
postgres[29645]: [19] LOG:  ReadRecord: record with zero length at
286/78E133F4
postgres[29645]: [20] LOG:  redo done at 286/78E133D0
postgres[29647]: [13] LOG:  connection received: host=192.168.0.1 port=47524
postgres[29647]: [14] FATAL:  The database system is starting up
postgres[29648]: [13] LOG:  connection received: host=192.168.0.1 port=47525
postgres[29648]: [14] FATAL:  The database system is starting up
postgres[29649]: [13] LOG:  connection received: host=192.168.0.1 port=47526
postgres[29649]: [14] FATAL:  The database system is starting up
postgres[29645]: [21] LOG:  database system is ready
=========================================================================


On 2005/10/14 10:57, Katsuhiko Okano様の書かれたメール:

> 岡野と申します。
> 
> 
> 直接解決にはならないですが、参考までに投稿します。
> 
> 
>>postgres[28659]: [3] PANIC:  open of /home/postgres/data/pg_clog/001B
>>failed: そのようなファイルやディレクトリはありません
>>postgres[28659]: [4] LOG:  statement: select * from pgstattuple('tbl')
> 
> (略)
> 
>>vacuum処理の中で、実施された「removing commit log file 001B」が
>>原因と考えておりますが、色々とWebで検索したもののこれといったものが
>>見つからず、投稿させていただいた次第です。
>>(postgresの後の[ ]内のPIDからvacuumが実施した処理で
>> あると考えております。)
> 
> 
> データベースは破損していないと思います。
> http://ml.postgresql.jp/pipermail/pgsql-jp/2005-July/019254.html
> で谷田さんが書いているように、
> ・CLOGファイルの中に各トランザクションの状態が入っている
> ・1つのCLOGファイルには1048576個のトランザクションの状態が入る
> ・もう誰も使わないと判断されたCLOGファイルはVACUUMで削除される
> という流れで、VACUUMによりCLOGが削除されたのだと思います。
> 
> 
> contribのpgstattuple関数がどういう仕組みになっているか
> 調べてみると何かわかるのかもしれません。
> ----------------------------------------
> Katsuhiko Okano
> k_okano at po.ntts.co.jp
> NTT Sofrware Corp. (division "NBRO-PT4")
> 


-- 
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ネクストコム株式会社 大阪支店 技術三課
松本 貴臣   (TEL : 06-6205-3017)
E-mail : matsumoto_takaomi @ nextcom.co.jp




pgsql-jp メーリングリストの案内