Hi

On one of our server we have a problem with the error "out of memory". Fragment of Postgres log :
idx_exportdate: 1024 total in 1 blocks; 368 free (0 chunks); 656 used
idx_documenttype_id: 1024 total in 1 blocks; 368 free (0 chunks); 656 used
idx_document_batch_id: 1024 total in 1 blocks; 328 free (0 chunks); 696 used
pk_document: 1024 total in 1 blocks; 328 free (0 chunks); 696 used
CachedPlan: 3072 total in 2 blocks; 296 free (0 chunks); 2776 used
CachedPlanSource: 3072 total in 2 blocks; 1464 free (0 chunks); 1608 used
notify_pkey: 1024 total in 1 blocks; 368 free (0 chunks); 656 used
CachedPlan: 3072 total in 2 blocks; 1960 free (0 chunks); 1112 used
CachedPlanSource: 3072 total in 2 blocks; 1720 free (1 chunks); 1352 used
pk_config: 1024 total in 1 blocks; 368 free (0 chunks); 656 used
pg_attrdef_adrelid_adnum_index: 1024 total in 1 blocks; 296 free (0 chunks); 728 used
pg_index_indrelid_index: 1024 total in 1 blocks; 328 free (0 chunks); 696 used
pg_db_role_setting_databaseid_rol_index: 1024 total in 1 blocks; 336 free (0 chunks); 688 used
pg_opclass_am_name_nsp_index: 1024 total in 1 blocks; 200 free (0 chunks); 824 used
pg_foreign_data_wrapper_name_index: 1024 total in 1 blocks; 368 free (0 chunks); 656 used
pg_enum_oid_index: 1024 total in 1 blocks; 368 free (0 chunks); 656 used
pg_class_relname_nsp_index: 1024 total in 1 blocks; 296 free (0 chunks); 728 used
pg_foreign_server_oid_index: 1024 total in 1 blocks; 368 free (0 chunks); 656 used
pg_statistic_relid_att_inh_index: 1024 total in 1 blocks; 200 free (0 chunks); 824 used
pg_cast_source_target_index: 1024 total in 1 blocks; 296 free (0 chunks); 728 used
pg_language_name_index: 1024 total in 1 blocks; 368 free (0 chunks); 656 used
pg_collation_oid_index: 1024 total in 1 blocks; 368 free (0 chunks); 656 used
pg_amop_fam_strat_index: 1024 total in 1 blocks; 200 free (0 chunks); 824 used
pg_index_indexrelid_index: 1024 total in 1 blocks; 328 free (0 chunks); 696 used
pg_ts_template_tmplname_index: 1024 total in 1 blocks; 336 free (0 chunks); 688 used
pg_ts_config_map_index: 1024 total in 1 blocks; 240 free (0 chunks); 784 used
pg_opclass_oid_index: 1024 total in 1 blocks; 328 free (0 chunks); 696 used
pg_foreign_data_wrapper_oid_index: 1024 total in 1 blocks; 368 free (0 chunks); 656 used
pg_ts_dict_oid_index: 1024 total in 1 blocks; 368 free (0 chunks); 656 used
pg_conversion_default_index: 1024 total in 1 blocks; 240 free (0 chunks); 784 used
pg_operator_oprname_l_r_n_index: 1024 total in 1 blocks; 200 free (0 chunks); 824 used
pg_trigger_tgrelid_tgname_index: 1024 total in 1 blocks; 296 free (0 chunks); 728 used
pg_enum_typid_label_index: 1024 total in 1 blocks; 336 free (0 chunks); 688 used
pg_ts_config_oid_index: 1024 total in 1 blocks; 368 free (0 chunks); 656 used
pg_user_mapping_oid_index: 1024 total in 1 blocks; 368 free (0 chunks); 656 used
pg_opfamily_am_name_nsp_index: 1024 total in 1 blocks; 240 free (0 chunks); 784 used
pg_foreign_table_relid_index: 1024 total in 1 blocks; 368 free (0 chunks); 656 used
pg_type_oid_index: 1024 total in 1 blocks; 328 free (0 chunks); 696 used
pg_aggregate_fnoid_index: 1024 total in 1 blocks; 368 free (0 chunks); 656 used
pg_constraint_oid_index: 1024 total in 1 blocks; 328 free (0 chunks); 696 used
pg_rewrite_rel_rulename_index: 1024 total in 1 blocks; 336 free (0 chunks); 688 used
pg_ts_parser_prsname_index: 1024 total in 1 blocks; 336 free (0 chunks); 688 used
pg_ts_config_cfgname_index: 1024 total in 1 blocks; 336 free (0 chunks); 688 used
pg_ts_parser_oid_index: 1024 total in 1 blocks; 368 free (0 chunks); 656 used
pg_operator_oid_index: 1024 total in 1 blocks; 328 free (0 chunks); 696 used
pg_namespace_nspname_index: 1024 total in 1 blocks; 328 free (0 chunks); 696 used
pg_ts_template_oid_index: 1024 total in 1 blocks; 368 free (0 chunks); 656 used
pg_amop_opr_fam_index: 1024 total in 1 blocks; 200 free (0 chunks); 824 used
pg_default_acl_role_nsp_obj_index: 1024 total in 1 blocks; 240 free (0 chunks); 784 used
pg_collation_name_enc_nsp_index: 1024 total in 1 blocks; 240 free (0 chunks); 784 used
pg_ts_dict_dictname_index: 1024 total in 1 blocks; 336 free (0 chunks); 688 used
pg_type_typname_nsp_index: 1024 total in 1 blocks; 296 free (0 chunks); 728 used
pg_opfamily_oid_index: 1024 total in 1 blocks; 368 free (0 chunks); 656 used
pg_class_oid_index: 1024 total in 1 blocks; 328 free (0 chunks); 696 used
pg_proc_proname_args_nsp_index: 1024 total in 1 blocks; 200 free (0 chunks); 824 used
pg_attribute_relid_attnum_index: 1024 total in 1 blocks; 296 free (0 chunks); 728 used
pg_proc_oid_index: 1024 total in 1 blocks; 328 free (0 chunks); 696 used
pg_language_oid_index: 1024 total in 1 blocks; 368 free (0 chunks); 656 used
pg_namespace_oid_index: 1024 total in 1 blocks; 328 free (0 chunks); 696 used
pg_amproc_fam_proc_index: 1024 total in 1 blocks; 200 free (0 chunks); 824 used
pg_foreign_server_name_index: 1024 total in 1 blocks; 368 free (0 chunks); 656 used
pg_attribute_relid_attnam_index: 1024 total in 1 blocks; 336 free (0 chunks); 688 used
pg_conversion_oid_index: 1024 total in 1 blocks; 368 free (0 chunks); 656 used
pg_user_mapping_user_server_index: 1024 total in 1 blocks; 336 free (0 chunks); 688 used
pg_conversion_name_nsp_index: 1024 total in 1 blocks; 336 free (0 chunks); 688 used
pg_authid_oid_index: 1024 total in 1 blocks; 328 free (0 chunks); 696 used
pg_auth_members_member_role_index: 1024 total in 1 blocks; 336 free (0 chunks); 688 used
pg_tablespace_oid_index: 1024 total in 1 blocks; 328 free (0 chunks); 696 used
pg_database_datname_index: 1024 total in 1 blocks; 328 free (0 chunks); 696 used
pg_auth_members_role_member_index: 1024 total in 1 blocks; 336 free (0 chunks); 688 used
pg_database_oid_index: 1024 total in 1 blocks; 328 free (0 chunks); 696 used
pg_authid_rolname_index: 1024 total in 1 blocks; 328 free (0 chunks); 696 used
MdSmgr: 8192 total in 1 blocks; 7552 free (0 chunks); 640 used
LOCALLOCK hash: 8192 total in 1 blocks; 2880 free (0 chunks); 5312 used
Timezones: 79320 total in 2 blocks; 5968 free (0 chunks); 73352 used
ErrorContext: 8192 total in 1 blocks; 8176 free (0 chunks); 16 used
2011-11-03 01:52:29 CET ERROR: out of memory
2011-11-03 01:52:29 CET DETAIL: Failed on request of size 128.
2011-11-03 01:52:29 CET STATEMENT: update index set value = $1::varchar where document_id = $2::int4 and indextype_id = $3::int4

Very often when this message appears, the database hangs. Errors appear in the random intervals and for different queries.

Below fragments of database configuration:
max_connections = 200

shared_buffers = 1024MB

work_mem = 16MB
maintenance_work_mem = 128MB

fsync = off
synchronous_commit = off

checkpoint_segments = 10

cpu_tuple_cost = 0.0030
cpu_index_tuple_cost = 0.0010
cpu_operator_cost = 0.0005
effective_cache_size = 1024MB


Windows Server 2008 server has 8GB of memory. Database: Postgres 9.1

What can cause appearance of these problems?