[pgsql-jp: 29785] リソースの制限

zensyo @ ann.tama.kawasaki.jp zensyo @ ann.tama.kawasaki.jp
2003年 5月 2日 (金) 15:58:54 JST


鈴木と申します。

postgresql7.xを使用しているのですが複数ユーザで共用しており、ユーザご
とにアクセス数等のリソースを制限できないかと思っておりました。
(しばしば、特定ユーザのページへのアクセスが多くなることがあり困ってい
ました)

最近mysqlをさわる機会があり、実際に試したわけではないのですがマニュア
ルに

4.3.6 Limiting user resources
Starting from MySQL 4.0.2 one can limit certain resources per user.
So far, the only available method of limiting usage of MySQL server
resources has been setting the max_user_connections startup variable
to a non-zero value. But this method is strictly global and does not
allow for management of individual users, which could be of particular
interest to Internet Service Providers.
Therefore, management of three resources is introduced on the
individual user level:

    * Number of all queries per hour: All commands that could be run
      by a user.
    * Number of all updates per hour: Any command that changes any
      table or database.
    * Number of connections made per hour: New connections opened per
      hour. 

のようなリソース制限機能があることがわかりました。
postgresqlの場合、MLやwebを検索してみましたが、なかなかそれらしいもの
が見つかりませんでした。

すでにpostgresqlでのデータやPHPスクリプトがあるためできればpostgresql
のままでいきたいのですが、何か良い方法はないでしょうか。

# PAMで認証するようにして、PAMモジュールを改造しようかとも思ったのです
  が、PAMでのパスワード認証自体まだうまくいっていなかったりします。




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