BUG #6186: out of memory while analyze - Mailing list pgsql-bugs

From Lampa
Subject BUG #6186: out of memory while analyze
Date
Msg-id 201108301120.p7UBKKoJ094519@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #6186: out of memory while analyze
Re: BUG #6186: out of memory while analyze
List pgsql-bugs
The following bug has been logged online:

Bug reference:      6186
Logged by:          Lampa
Email address:      lampacz@gmail.com
PostgreSQL version: 9.0.4/8.4.8
Operating system:   Linux Debian testing 32bit
Description:        out of memory while analyze
Details:

Trying analyze table (ANALYZE TABLE table or VACUUM ANALYZE table) with
3051316 rows (displayed size 2521MB in \dt+)

Log:
TopMemoryContext: 42800 total in 5 blocks; 5304 free (7 chunks); 37496 used
  Type information cache: 8192 total in 1 blocks; 1800 free (0 chunks); 6392
used
  TopTransactionContext: 8192 total in 1 blocks; 7696 free (0 chunks); 496
used
  MessageContext: 8192 total in 1 blocks; 5688 free (1 chunks); 2504 used
  Operator class cache: 8192 total in 1 blocks; 3848 free (0 chunks); 4344
used
  smgr relation table: 8192 total in 1 blocks; 2816 free (0 chunks); 5376
used
  TransactionAbortContext: 32768 total in 1 blocks; 32752 free (0 chunks);
16 used
  Portal hash: 8192 total in 1 blocks; 3912 free (0 chunks); 4280 used
  PortalMemory: 8192 total in 1 blocks; 8040 free (0 chunks); 152 used
    PortalHeapMemory: 1024 total in 1 blocks; 1008 free (13 chunks); 16
used
      Analyze: 2236767256 total in 279 blocks; 18080 free (423 chunks);
2236749176 used
      Vacuum: 8192 total in 1 blocks; 7872 free (0 chunks); 320 used
  Relcache by OID: 8192 total in 1 blocks; 2856 free (0 chunks); 5336 used
  CacheMemoryContext: 667696 total in 20 blocks; 135264 free (1 chunks);
532432 used
    i_table_zamid: 1024 total in 1 blocks; 344 free (0 chunks); 680 used
    i_table_zamestnanci_id: 1024 total in 1 blocks; 344 free (0 chunks); 680
used
    i_table_zacatek_delka: 1024 total in 1 blocks; 280 free (0 chunks); 744
used
    i_table_zacatek: 1024 total in 1 blocks; 344 free (0 chunks); 680 used
    i_table_tymy_instance_id: 1024 total in 1 blocks; 344 free (0 chunks);
680 used
    i_table_tymy_id: 1024 total in 1 blocks; 344 free (0 chunks); 680 used
    i_table_strid: 1024 total in 1 blocks; 344 free (0 chunks); 680 used
    i_table_stavukonu_id: 1024 total in 1 blocks; 344 free (0 chunks); 680
used
    i_table_stavcas: 1024 total in 1 blocks; 344 free (0 chunks); 680 used
    i_table_stav: 1024 total in 1 blocks; 344 free (0 chunks); 680 used
    i_table_splneno_cas: 1024 total in 1 blocks; 344 free (0 chunks); 680
used
    i_table_skupinyzamesntnacu_id: 1024 total in 1 blocks; 344 free (0
chunks); 680 used
    i_table_sablonyukonu_id: 1024 total in 1 blocks; 344 free (0 chunks);
680 used
    i_table_prostredky_id: 1024 total in 1 blocks; 344 free (0 chunks); 680
used
    i_table_priorita: 1024 total in 1 blocks; 344 free (0 chunks); 680 used
    i_table_pacienti_id: 1024 total in 1 blocks; 344 free (0 chunks); 680
used
    i_table_odbid: 1024 total in 1 blocks; 344 free (0 chunks); 680 used
    i_table_objednano_id: 1024 total in 1 blocks; 344 free (0 chunks); 680
used
    i_table_nadrazeny_ukon: 1024 total in 1 blocks; 344 free (0 chunks); 680
used
    i_table_maxid: 1024 total in 1 blocks; 344 free (0 chunks); 680 used
    i_table_kpid_spl: 1024 total in 1 blocks; 344 free (0 chunks); 680 used
    i_table_kpid_obj: 1024 total in 1 blocks; 344 free (0 chunks); 680 used
    i_table_klientskekarty_id: 1024 total in 1 blocks; 344 free (0 chunks);
680 used
    i_table_delka: 1024 total in 1 blocks; 344 free (0 chunks); 680 used
    i_table_adresareukonu_id: 1024 total in 1 blocks; 344 free (0 chunks);
680 used
    table_pkey: 1024 total in 1 blocks; 344 free (0 chunks); 680 used
    pg_index_indrelid_index: 1024 total in 1 blocks; 304 free (0 chunks);
720 used
    pg_attrdef_adrelid_adnum_index: 1024 total in 1 blocks; 240 free (0
chunks); 784 used
    pg_user_mapping_user_server_index: 1024 total in 1 blocks; 280 free (0
chunks); 744 used
    pg_user_mapping_oid_index: 1024 total in 1 blocks; 344 free (0 chunks);
680 used
    pg_type_oid_index: 1024 total in 1 blocks; 304 free (0 chunks); 720
used
    pg_type_typname_nsp_index: 1024 total in 1 blocks; 280 free (0 chunks);
744 used
    pg_ts_template_oid_index: 1024 total in 1 blocks; 344 free (0 chunks);
680 used
    pg_ts_template_tmplname_index: 1024 total in 1 blocks; 280 free (0
chunks); 744 used
    pg_ts_parser_oid_index: 1024 total in 1 blocks; 344 free (0 chunks); 680
used
    pg_ts_parser_prsname_index: 1024 total in 1 blocks; 280 free (0 chunks);
744 used
    pg_ts_dict_oid_index: 1024 total in 1 blocks; 344 free (0 chunks); 680
used
    pg_ts_dict_dictname_index: 1024 total in 1 blocks; 280 free (0 chunks);
744 used
    pg_ts_config_oid_index: 1024 total in 1 blocks; 344 free (0 chunks); 680
used
    pg_ts_config_cfgname_index: 1024 total in 1 blocks; 280 free (0 chunks);
744 used
    pg_ts_config_map_index: 1024 total in 1 blocks; 192 free (0 chunks); 832
used
    pg_statistic_relid_att_index: 1024 total in 1 blocks; 280 free (0
chunks); 744 used
    pg_class_relname_nsp_index: 1024 total in 1 blocks; 240 free (0 chunks);
784 used
    pg_proc_oid_index: 1024 total in 1 blocks; 344 free (0 chunks); 680
used
    pg_proc_proname_args_nsp_index: 1024 total in 1 blocks; 192 free (0
chunks); 832 used
    pg_opfamily_oid_index: 1024 total in 1 blocks; 344 free (0 chunks); 680
used
    pg_opfamily_am_name_nsp_index: 1024 total in 1 blocks; 192 free (0
chunks); 832 used
    pg_operator_oprname_l_r_n_index: 1024 total in 1 blocks; 128 free (0
chunks); 896 used
    pg_namespace_oid_index: 1024 total in 1 blocks; 304 free (0 chunks); 720
used
    pg_namespace_nspname_index: 1024 total in 1 blocks; 304 free (0 chunks);
720 used
    pg_language_oid_index: 1024 total in 1 blocks; 344 free (0 chunks); 680
used
    pg_language_name_index: 1024 total in 1 blocks; 344 free (0 chunks); 680
used
    pg_foreign_server_oid_index: 1024 total in 1 blocks; 344 free (0
chunks); 680 used
    pg_foreign_server_name_index: 1024 total in 1 blocks; 344 free (0
chunks); 680 used
    pg_foreign_data_wrapper_oid_index: 1024 total in 1 blocks; 344 free (0
chunks); 680 used
    pg_foreign_data_wrapper_name_index: 1024 total in 1 blocks; 344 free (0
chunks); 680 used
    pg_enum_typid_label_index: 1024 total in 1 blocks; 280 free (0 chunks);
744 used
    pg_enum_oid_index: 1024 total in 1 blocks; 344 free (0 chunks); 680
used
    pg_database_oid_index: 1024 total in 1 blocks; 304 free (0 chunks); 720
used
    pg_conversion_oid_index: 1024 total in 1 blocks; 344 free (0 chunks);
680 used
    pg_constraint_oid_index: 1024 total in 1 blocks; 344 free (0 chunks);
680 used
    pg_conversion_name_nsp_index: 1024 total in 1 blocks; 280 free (0
chunks); 744 used
    pg_conversion_default_index: 1024 total in 1 blocks; 128 free (0
chunks); 896 used
    pg_opclass_am_name_nsp_index: 1024 total in 1 blocks; 152 free (0
chunks); 872 used
    pg_cast_source_target_index: 1024 total in 1 blocks; 240 free (0
chunks); 784 used
    pg_authid_oid_index: 1024 total in 1 blocks; 304 free (0 chunks); 720
used
    pg_authid_rolname_index: 1024 total in 1 blocks; 304 free (0 chunks);
720 used
    pg_auth_members_role_member_index: 1024 total in 1 blocks; 280 free (0
chunks); 744 used
    pg_auth_members_member_role_index: 1024 total in 1 blocks; 280 free (0
chunks); 744 used
    pg_attribute_relid_attnam_index: 1024 total in 1 blocks; 280 free (0
chunks); 744 used
    pg_amop_opr_fam_index: 1024 total in 1 blocks; 280 free (0 chunks); 744
used
    pg_aggregate_fnoid_index: 1024 total in 1 blocks; 344 free (0 chunks);
680 used
    pg_trigger_tgrelid_tgname_index: 1024 total in 1 blocks; 240 free (0
chunks); 784 used
    pg_rewrite_rel_rulename_index: 1024 total in 1 blocks; 280 free (0
chunks); 744 used
    pg_operator_oid_index: 1024 total in 1 blocks; 304 free (0 chunks); 720
used
    pg_amproc_fam_proc_index: 1024 total in 1 blocks; 88 free (0 chunks);
936 used
    pg_amop_fam_strat_index: 1024 total in 1 blocks; 88 free (0 chunks); 936
used
    pg_opclass_oid_index: 1024 total in 1 blocks; 304 free (0 chunks); 720
used
    pg_index_indexrelid_index: 1024 total in 1 blocks; 304 free (0 chunks);
720 used
    pg_attribute_relid_attnum_index: 1024 total in 1 blocks; 240 free (0
chunks); 784 used
    pg_class_oid_index: 1024 total in 1 blocks; 304 free (0 chunks); 720
used
  MdSmgr: 8192 total in 1 blocks; 7384 free (0 chunks); 808 used
  LOCALLOCK hash: 8192 total in 1 blocks; 3912 free (0 chunks); 4280 used
  Timezones: 78520 total in 2 blocks; 5968 free (0 chunks); 72552 used
  ErrorContext: 8192 total in 1 blocks; 8176 free (3 chunks); 16 used
2011-08-30 12:39:50 CEST ERROR:  out of memory
2011-08-30 12:39:50 CEST DETAIL:  Failed on request of size 1600.
2011-08-30 12:39:50 CEST STATEMENT:  ANALYZE table;

On another machine with similar configuration (memory/cpu) but 64bit
everything is ok. Machine has 4G ram/8G swap, cpu X3430 2.4GHz. Memory seems
to be OK - memtested

Thank you.

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: BUG #6185: Segmentation fault with NULL string columns
Next
From: "Bhavesh Dangi"
Date:
Subject: BUG #6187: Select query stuck