[pgsql-jp: 32870] Re: [Q] 巨大なテキストの登録

Yoshinao Ikeuchi el4y-ikuc @ asahi-net.or.jp
2004年 4月 24日 (土) 13:51:53 JST


池内と申します。

とりあえず、psqlにて巨大テキストの登録ができないことが
わかりました。

  memo=# update file set body=repeat('a',1024*1024*1000) where fname like 'test.txt';
  ERROR:  out of memory
  DETAIL:  Failed on request of size 1048576004.

  memo=# \d file;
     Table "public.file"
   Column |  Type   | Modifiers 
  --------+---------+-----------
   id     | integer | not null
   fname  | text    | not null
   body   | text    | not null
  Indexes:
      "file_id_key" unique, btree (id)

メモリーが足りないと思われるのですが、具体的な情報はどの
ようにすれば、取得できるでしょうか?

どこのメモリーがどの程度足りないのか?
そもそも今の環境では不可能なのか?

御存じの方がいらっしゃいましたらアドバイスお願いします。

あと、上記実行中はものすごい負荷がかかり、MP3の再生音がと
ぎれてしまうほどでした。

[環境]
  VineLinux2.6r4 kernel-2.6.3 (PentiumIII-1.26GHz/1.5GB Memory)
  PostgreSQL-7.4.2

  --postgresql.confの内容--
  # - Memory -

  shared_buffers = 10240  # min 16, at least max_connections*2, 8KB each
  #sort_mem = 1024     # min 64, size in KB
  #vacuum_mem = 8192      # min 1024, size in KB

  --OSの環境--
  # free
    Unknown HZ value! (90) Assume 100.
                合計     使用済   空き領域   共有領域    バッファ キャッシュ
  Mem:       1552844     130748    1422096          0       5952      59952
  -/+ バッファ:           64844    1488000
  Swap:       987988      70984     917004

  # ipcs -l -m
  ------ シェアードメモリの制限 --------
  セグメント数の最大値 = 4096
  セグメントサイズの最大 (単位:KB) = 1048576
  合計共有メモリの最大 (単位:KB) = 268435456
  最小セグメントサイズ (単位:KB) = 1

--
 Yoshinao Ikeuchi[池内 義直]
 el4y-ikuc @ asahi-net.or.jp



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