Re: Out of memory error when doing an update with IN clause - Mailing list pgsql-general
From | Sean Shanny |
---|---|
Subject | Re: Out of memory error when doing an update with IN clause |
Date | |
Msg-id | 3FF06192.2070306@earthlink.net Whole thread Raw |
In response to | Re: Out of memory error when doing an update with IN clause (Tom Lane <tgl@sss.pgh.pa.us>) |
Responses |
Re: Out of memory error when doing an update with IN clause
|
List | pgsql-general |
Tom, There are no FK's or triggers on this or any of the tables in our warehouse schema. Also I should have mentioned that this update will produce 0 rows as these values do not exist in this table. We have a dimension table named d_servlet that holds servlet names and id's. This table is shared amongst several fact tables including the one in question. This update was to ensure that the changes in the d_servlet table would be reflected in f_commerce_impressions. It turns out that the values did not exist in the table. Here is output from the /usr/local/pgsql/data/servlerlog when this fails: TopMemoryContext: 40960 total in 4 blocks; 12920 free (25 chunks); 28040 used TopTransactionContext: 8192 total in 1 blocks; 8136 free (0 chunks); 56 used DeferredTriggerXact: 0 total in 0 blocks; 0 free (0 chunks); 0 used MessageContext: 57344 total in 3 blocks; 9000 free (1 chunks); 48344 used PortalMemory: 8192 total in 1 blocks; 8040 free (0 chunks); 152 used PortalHeapMemory: 1024 total in 1 blocks; 936 free (0 chunks); 88 used ExecutorState: 24576 total in 2 blocks; 5008 free (8 chunks); 19568 used DynaHashTable: 534773784 total in 65 blocks; 31488 free (255 chunks); 534742296 used ExprContext: 0 total in 0 blocks; 0 free (0 chunks); 0 used CacheMemoryContext: 1040384 total in 7 blocks; 9504 free (1 chunks); 1030880 used idx_commerce_impressions_servlet: 1024 total in 1 blocks; 640 free (0 chunks); 384 used idx_commerce_impressions_page_view: 1024 total in 1 blocks; 640 free (0 chunks); 384 used idx_commerce_impressions_date_dec_2003: 1024 total in 1 blocks; 640 free (0 chunks); 384 used idx_commerce_impressions_date_nov_2003: 1024 total in 1 blocks; 640 free (0 chunks); 384 used f_commerce_impressions_pkey: 1024 total in 1 blocks; 640 free (0 chunks); 384 used idx_pageviews_content: 1024 total in 1 blocks; 640 free (0 chunks); 384 used idx_pageviews_content: 1024 total in 1 blocks; 640 free (0 chunks); 384 used pg_description_o_c_o_index: 2048 total in 1 blocks; 768 free (0 chunks); 1280 used pg_depend_depender_index: 2048 total in 1 blocks; 768 free (0 chunks); 1280 used pg_depend_reference_index: 2048 total in 1 blocks; 768 free (0 chunks); 1280 used pg_attrdef_oid_index: 1024 total in 1 blocks; 640 free (0 chunks); 384 used idx_pageviews_servlet: 1024 total in 1 blocks; 640 free (0 chunks); 384 used idx_pageviews_session: 1024 total in 1 blocks; 640 free (0 chunks); 384 used idx_pageviews_referring_servlet: 1024 total in 1 blocks; 640 free (0 chunks); 384 used idx_pageviews_date_dec_2003: 1024 total in 1 blocks; 640 free (0 chunks); 384 used idx_pageviews_date_nov_2003: 1024 total in 1 blocks; 640 free (0 chunks); 384 used f_pageviews_pkey: 1024 total in 1 blocks; 640 free (0 chunks); 384 used pg_index_indrelid_index: 1024 total in 1 blocks; 640 free (0 chunks); 384 used pg_attrdef_adrelid_adnum_index: 1024 total in 1 blocks; 320 free (0 chunks); 704 used pg_amop_opc_strategy_index: 1024 total in 1 blocks; 320 free (0 chunks); 704 used pg_shadow_usename_index: 1024 total in 1 blocks; 640 free (0 chunks); 384 used pg_amop_opr_opc_index: 1024 total in 1 blocks; 320 free (0 chunks); 704 used pg_conversion_oid_index: 1024 total in 1 blocks; 640 free (0 chunks); 384 used pg_language_name_index: 1024 total in 1 blocks; 640 free (0 chunks); 384 used pg_statistic_relid_att_index: 1024 total in 1 blocks; 320 free (0 chunks); 704 used pg_attribute_relid_attnam_index: 1024 total in 1 blocks; 320 free (0 chunks); 704 used pg_shadow_usesysid_index: 1024 total in 1 blocks; 640 free (0 chunks); 384 used pg_cast_source_target_index: 1024 total in 1 blocks; 320 free (0 chunks); 704 used pg_conversion_name_nsp_index: 1024 total in 1 blocks; 320 free (0 chunks); 704 used pg_trigger_tgrelid_tgname_index: 1024 total in 1 blocks; 320 free (0 chunks); 704 used pg_namespace_nspname_index: 1024 total in 1 blocks; 640 free (0 chunks); 384 used pg_conversion_default_index: 2048 total in 1 blocks; 704 free (0 chunks); 1344 used pg_class_relname_nsp_index: 1024 total in 1 blocks; 320 free (0 chunks); 704 used pg_aggregate_fnoid_index: 1024 total in 1 blocks; 640 free (0 chunks); 384 used pg_inherits_relid_seqno_index: 1024 total in 1 blocks; 320 free (0 chunks); 704 used pg_language_oid_index: 1024 total in 1 blocks; 640 free (0 chunks); 384 used pg_type_typname_nsp_index: 1024 total in 1 blocks; 320 free (0 chunks); 704 used pg_group_sysid_index: 1024 total in 1 blocks; 640 free (0 chunks); 384 used pg_namespace_oid_index: 1024 total in 1 blocks; 640 free (0 chunks); 384 used pg_proc_proname_args_nsp_index: 2048 total in 1 blocks; 704 free (0 chunks); 1344 used pg_opclass_am_name_nsp_index: 2048 total in 1 blocks; 768 free (0 chunks); 1280 used pg_group_name_index: 1024 total in 1 blocks; 640 free (0 chunks); 384 used pg_proc_oid_index: 1024 total in 1 blocks; 640 free (0 chunks); 384 used pg_operator_oid_index: 1024 total in 1 blocks; 640 free (0 chunks); 384 used pg_amproc_opc_procnum_index: 1024 total in 1 blocks; 320 free (0 chunks); 704 used pg_index_indexrelid_index: 1024 total in 1 blocks; 640 free (0 chunks); 384 used pg_operator_oprname_l_r_n_index: 2048 total in 1 blocks; 704 free (0 chunks); 1344 used pg_opclass_oid_index: 1024 total in 1 blocks; 640 free (0 chunks); 384 used pg_rewrite_rel_rulename_index: 1024 total in 1 blocks; 320 free (0 chunks); 704 used pg_type_oid_index: 1024 total in 1 blocks; 640 free (0 chunks); 384 used pg_attribute_relid_attnum_index: 1024 total in 1 blocks; 320 free (0 chunks); 704 used pg_class_oid_index: 1024 total in 1 blocks; 640 free (0 chunks); 384 used MdSmgr: 8192 total in 1 blocks; 5976 free (18 chunks); 2216 used DynaHash: 8192 total in 1 blocks; 6912 free (0 chunks); 1280 used DynaHashTable: 8192 total in 1 blocks; 2008 free (0 chunks); 6184 used DynaHashTable: 8192 total in 1 blocks; 5080 free (0 chunks); 3112 used DynaHashTable: 8192 total in 1 blocks; 2008 free (0 chunks); 6184 used DynaHashTable: 8192 total in 1 blocks; 1984 free (0 chunks); 6208 used DynaHashTable: 8192 total in 1 blocks; 3520 free (0 chunks); 4672 used DynaHashTable: 24576 total in 2 blocks; 13240 free (4 chunks); 11336 used DynaHashTable: 0 total in 0 blocks; 0 free (0 chunks); 0 used DynaHashTable: 0 total in 0 blocks; 0 free (0 chunks); 0 used DynaHashTable: 0 total in 0 blocks; 0 free (0 chunks); 0 used DynaHashTable: 0 total in 0 blocks; 0 free (0 chunks); 0 used DynaHashTable: 0 total in 0 blocks; 0 free (0 chunks); 0 used ErrorContext: 8192 total in 1 blocks; 8176 free (0 chunks); 16 used ERROR: out of memory DETAIL: Failed on request of size 1024. Thanks --sean Tom Lane wrote: >Sean Shanny <shannyconsulting@earthlink.net> writes: > > >>update f_commerce_impressions set servlet_key = 60 where servlet_key in >>(68,69,70,71,87,90,94,91,98,105,106); >>ERROR: out of memory >> >> > >How many rows will this try to update? Do you have any triggers or >foreign keys in this table? I'm wondering if the list of pending >trigger events could be the problem ... > > regards, tom lane > > >
pgsql-general by date: