1

PostgreSQL で特定のテーブルのみのログ記録を有効にする (つまり、テーブルレベルの粒度でログ記録する) ことができるかどうかを知りたいですか?

現在、ログは次の方法で出力されています。このように完全なログを有効にすると、割り当てられた HDD スペースが 30 分以内に使い果たされます。

GMT_jbpm_LOG:  00000: duration: 0.104 ms  bind <unnamed>: select instances0_.PROCESSINSTANCE_ as PROCESSI4_1_, instances0_.ID_ as ID1_1_, instances0_.NAME_ as NAME6_1_, instances0_.ID_ as ID1_54_0_, instances0_.VERSION_ as VERSION3_54_0_, instances0_.PROCESSINSTANCE_ as PROCESSI4_54_0_, instances0_.TASKMGMTDEFINITION_ as TASKMGMT5_54_0_, instances0_.CLASS_ as CLASS2_54_0_ from JBPM_MODULEINSTANCE instances0_ where instances0_.PROCESSINSTANCE_=$1
2013-03-27 09:42:09.039 GMT_jbpm_DETAIL:  parameters: $1 = '9646163'
2013-03-27 09:42:09.039 GMT_jbpm_LOCATION:  exec_bind_message, postgres.c:1784
2013-03-27 09:42:09.039 GMT_amq_LOG:  00000: duration: 0.023 ms
2013-03-27 09:42:09.039 GMT_amq_LOCATION:  exec_execute_message, postgres.c:1988
2013-03-27 09:42:09.039 GMT_jbpm_LOG:  00000: execute <unnamed>: select instances0_.PROCESSINSTANCE_ as PROCESSI4_1_, instances0_.ID_ as ID1_1_, instances0_.NAME_ as NAME6_1_, instances0_.ID_ as ID1_54_0_, instances0_.VERSION_ as VERSION3_54_0_, instances0_.PROCESSINSTANCE_ as PROCESSI4_54_0_, instances0_.TASKMGMTDEFINITION_ as TASKMGMT5_54_0_, instances0_.CLASS_ as CLASS2_54_0_ from JBPM_MODULEINSTANCE instances0_ where instances0_.PROCESSINSTANCE_=$1
2013-03-27 09:42:09.039 GMT_jbpm_DETAIL:  parameters: $1 = '9646163'
2013-03-27 09:42:09.039 GMT_jbpm_LOCATION:  exec_execute_message, postgres.c:1918
2013-03-27 09:42:09.039 GMT_jbpm_LOG:  00000: duration: 0.053 ms
2013-03-27 09:42:09.039 GMT_jbpm_LOCATION:  exec_execute_message, postgres.c:1988
2013-03-27 09:42:09.039 GMT_bnw_LOG:  00000: duration: 0.068 ms  parse <unnamed>: select workflowde0_.workflow_definition_id as workflow1_14_0_, workflowde0_.created as created14_0_, workflowde0_.deleted as deleted14_0_, workflowde0_.name as name14_0_, workflowde0_.version as version14_0_, workflowde0_.workspace_id as workspace6_14_0_ from workflow_definition workflowde0_ where workflowde0_.workflow_definition_id=$1
2013-03-27 09:42:09.039 GMT_bnw_LOCATION:  exec_parse_message, postgres.c:1367
2013-03-27 09:42:09.039 GMT_bnw_LOG:  00000: duration: 0.059 ms  parse <unnamed>: update worker set created=$1, deleted=$2, name=$3, full_name=$4, worker_type=$5, max_jobs_in_progress=$6, max_jobs_queued=$7, jobs_queued=$8, workspace_id=$9 where worker_id=$10
2013-03-27 09:42:09.039 GMT_bnw_LOCATION:  exec_parse_message, postgres.c:1367
2013-03-27 09:42:09.039 GMT_bnw_LOG:  00000: duration: 0.077 ms  bind <unnamed>: select workflowde0_.workflow_definition_id as workflow1_14_0_, workflowde0_.created as created14_0_, workflowde0_.deleted as deleted14_0_, workflowde0_.name as name14_0_, workflowde0_.version as version14_0_, workflowde0_.workspace_id as workspace6_14_0_ from workflow_definition workflowde0_ where workflowde0_.workflow_definition_id=$1
2013-03-27 09:42:09.039 GMT_bnw_DETAIL:  parameters: $1 = '7089580'

私がしたいのは、table という名前のworkerテーブルのログ記録を有効にすることですが、データベース内の他のテーブルに関するイベントのログ記録は避けてください。

繰り返しますが、PostgreSQL で特定のテーブルのみの情報をログに記録する方法はありますか?

UPDATE worker SET created=$1, deleted=$2, name=$3;
4

1 に答える 1