[pgsql-jp: 29853] Re: ファイルの肥大化
sugita @ sra.co.jp
sugita @ sra.co.jp
2003年 5月 12日 (月) 19:53:56 JST
杉田です。
From: yoichi_takano @ ha.daifuku.co.jp
Subject: [pgsql-jp: 29847] ファイルの肥大化
Date: Mon, 12 May 2003 13:59:06 +0900
;;; お世話になります。高野と申します。
;;;
;;; Redhat8.0 PostgreSQL7.1.3で運用しております。
;;;
;;; pgdata以下に大きなファイルができて、消えずに困っております。
;;;
;;; bash-2.05$ ls -l /usr/local/pgsql/data/base/26228/16948*
;;; -rw------- 1 postgres other 1073741824 8月 5 2002 16948
;;; -rw------- 1 postgres other 1073741824 9月 9 2002 16948.1
;;; -rw------- 1 postgres other 1073741824 9月 30 2002 16948.2
;;; -rw------- 1 postgres other 1073741824 11月 5 2002 16948.3
;;; -rw------- 1 postgres other 1073741824 11月 20 10:10 16948.4
;;; -rw------- 1 postgres other 1073741824 1月 18 15:46 16948.5
;;; -rw------- 1 postgres other 1073741824 3月 11 11:23 16948.6
;;; -rw------- 1 postgres other 1073741824 3月 28 10:27 16948.7
;;; -rw------- 1 postgres other 553181184 5月 12 13:24 16948.8
;;; bash-2.05$
;;;
;;; そこで以下のようにしてみるとラージオブジェクトで管理しているファイル
;;; が大きくなっていのものと予想しましたが、実際ラージオブジェクトで管
;;; 理しているデータの合計は77965334 (byte)しかありません。
...
;;; hoge=# select sum(file_size) from file_lobj;
;;; sum
;;; ----------
;;; 77965334
;;; (1 row)
このようにしてアプリケーション側で管理しているデータのサイズが正しいとするな
らば、PostgreSQL 側の問題ではなく、アプリケーション側が、アプリケーション的に
不要になったラージオブジェクトの削除をしていないのではないでしょうか?
Kenji Sugita
pgsql-jp メーリングリストの案内