X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C27F8D1B772 for ; Mon, 26 Jul 2004 13:38:37 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 84118-07 for ; Mon, 26 Jul 2004 16:38:29 +0000 (GMT) Received: from pegasus.host4u.net (pegasus.host4u.net [209.150.128.41]) by svr1.postgresql.org (Postfix) with ESMTP id 5E398D1B731 for ; Mon, 26 Jul 2004 13:38:27 -0300 (ADT) Received: from graciousstyle.com (ca-stmnca-cuda1-blade2b-207.stmnca.adelphia.net [68.65.195.207]) by pegasus.host4u.net (8.11.6/8.11.6) with ESMTP id i6QGcJ932369; Mon, 26 Jul 2004 11:38:20 -0500 Message-ID: <4105336E.4030604@graciousstyle.com> Date: Mon, 26 Jul 2004 09:38:06 -0700 From: Si Chen Reply-To: schen@graciousstyle.com Organization: Gracious Style User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-us, en, zh-cn MIME-Version: 1.0 To: Tom Lane , pgsql-general@postgresql.org Subject: Re: [ADMIN] how to find transaction associated with a lock References: <41001296.3090609@graciousstyle.com> <12341.1090529103@sss.pgh.pa.us> <4100353D.9080202@graciousstyle.com> <13323.1090535841@sss.pgh.pa.us> In-Reply-To: <13323.1090535841@sss.pgh.pa.us> Content-Type: multipart/mixed; boundary="------------090509050009050000000704" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.2 tagged_above=0.0 required=5.0 tests=RCVD_IN_RFCI, RCVD_IN_SORBS X-Spam-Level: X-Archive-Number: 200407/746 X-Sequence-Number: 63345 This is a multi-part message in MIME format. --------------090509050009050000000704 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi Tom, Thanks for your help last week. I had the problem again where things got hung up during a transaction, and it was at the order_header table. Here is what the pg_locks show. Does it confirm what you are saying, which is that multiple transactions have tried to insert into this table? Thanks, Si > > --------------090509050009050000000704 Content-Type: text/plain; name="locks.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="locks.txt" pid | datname | relname | mode -------+---------------+-----------------------------+------------------ 9861 | graciousstyle | billing_account | AccessShareLock 9862 | graciousstyle | billing_account | AccessShareLock 9931 | graciousstyle | billing_account | AccessShareLock 9932 | graciousstyle | billing_account | AccessShareLock 10060 | graciousstyle | billing_account | AccessShareLock 9862 | graciousstyle | carrier_shipment_method | AccessShareLock 9861 | graciousstyle | contact_mech | AccessShareLock 9862 | graciousstyle | contact_mech | AccessShareLock 9931 | graciousstyle | contact_mech | AccessShareLock 9932 | graciousstyle | contact_mech | AccessShareLock 10060 | graciousstyle | contact_mech | AccessShareLock 9861 | graciousstyle | credit_card | AccessShareLock 9931 | graciousstyle | credit_card | AccessShareLock 9932 | graciousstyle | credit_card | AccessShareLock 10060 | graciousstyle | credit_card | AccessShareLock 9862 | graciousstyle | entity_sync_remove | AccessShareLock 9862 | graciousstyle | entity_sync_remove | RowExclusiveLock 9862 | graciousstyle | facility | AccessShareLock 9862 | graciousstyle | facility | RowShareLock 9862 | graciousstyle | geo | AccessShareLock 9862 | graciousstyle | inventory_item | AccessShareLock 9862 | graciousstyle | inventory_item | RowExclusiveLock 9862 | graciousstyle | inventory_item_type | AccessShareLock 9862 | graciousstyle | inventory_item_type | RowShareLock 9861 | graciousstyle | item_issuance | AccessShareLock 9862 | graciousstyle | item_issuance | AccessShareLock 9931 | graciousstyle | item_issuance | AccessShareLock 9932 | graciousstyle | item_issuance | AccessShareLock 10060 | graciousstyle | item_issuance | AccessShareLock 9861 | graciousstyle | order_adjustment | AccessShareLock 9862 | graciousstyle | order_adjustment | AccessShareLock 9931 | graciousstyle | order_adjustment | AccessShareLock 9932 | graciousstyle | order_adjustment | AccessShareLock 9935 | graciousstyle | order_adjustment | AccessShareLock 10060 | graciousstyle | order_adjustment | AccessShareLock 9862 | graciousstyle | order_adjustment | RowExclusiveLock 9862 | graciousstyle | order_adjustment | RowShareLock 9862 | graciousstyle | order_adjustment_attribute | AccessShareLock 9862 | graciousstyle | order_adjustment_attribute | RowShareLock 9861 | graciousstyle | order_adjustment_type | AccessShareLock 9862 | graciousstyle | order_adjustment_type | AccessShareLock 9931 | graciousstyle | order_adjustment_type | AccessShareLock 9932 | graciousstyle | order_adjustment_type | AccessShareLock 10060 | graciousstyle | order_adjustment_type | AccessShareLock 9862 | graciousstyle | order_adjustment_type | RowShareLock 9861 | graciousstyle | order_contact_mech | AccessShareLock 9862 | graciousstyle | order_contact_mech | AccessShareLock 9931 | graciousstyle | order_contact_mech | AccessShareLock 9932 | graciousstyle | order_contact_mech | AccessShareLock 10060 | graciousstyle | order_contact_mech | AccessShareLock 9861 | graciousstyle | order_header | AccessShareLock 9862 | graciousstyle | order_header | AccessShareLock 9931 | graciousstyle | order_header | AccessShareLock 9932 | graciousstyle | order_header | AccessShareLock 9935 | graciousstyle | order_header | AccessShareLock 10060 | graciousstyle | order_header | AccessShareLock 27874 | graciousstyle | order_header | AccessShareLock 9862 | graciousstyle | order_header | RowExclusiveLock 9935 | graciousstyle | order_header | RowExclusiveLock 27874 | graciousstyle | order_header | RowExclusiveLock 9861 | graciousstyle | order_header | RowShareLock 9862 | graciousstyle | order_header | RowShareLock 9931 | graciousstyle | order_header | RowShareLock 9932 | graciousstyle | order_header | RowShareLock 10060 | graciousstyle | order_header | RowShareLock 9861 | graciousstyle | order_item | AccessShareLock 9862 | graciousstyle | order_item | AccessShareLock 9931 | graciousstyle | order_item | AccessShareLock 9932 | graciousstyle | order_item | AccessShareLock 9935 | graciousstyle | order_item | AccessShareLock 10060 | graciousstyle | order_item | AccessShareLock 9862 | graciousstyle | order_item | RowExclusiveLock 9862 | graciousstyle | order_item_inventory_res | AccessShareLock 9862 | graciousstyle | order_item_inventory_res | RowExclusiveLock 9862 | graciousstyle | order_item_type | AccessShareLock 9862 | graciousstyle | order_item_type | RowShareLock 9861 | graciousstyle | order_notification | AccessShareLock 9931 | graciousstyle | order_notification | AccessShareLock 9932 | graciousstyle | order_notification | AccessShareLock 10060 | graciousstyle | order_notification | AccessShareLock 9861 | graciousstyle | order_notification | RowExclusiveLock 9931 | graciousstyle | order_notification | RowExclusiveLock 9932 | graciousstyle | order_notification | RowExclusiveLock 10060 | graciousstyle | order_notification | RowExclusiveLock 9861 | graciousstyle | order_payment_preference | AccessShareLock 9862 | graciousstyle | order_payment_preference | AccessShareLock 9931 | graciousstyle | order_payment_preference | AccessShareLock 9932 | graciousstyle | order_payment_preference | AccessShareLock 10060 | graciousstyle | order_payment_preference | AccessShareLock 9861 | graciousstyle | order_role | AccessShareLock 9862 | graciousstyle | order_role | AccessShareLock 9931 | graciousstyle | order_role | AccessShareLock 9932 | graciousstyle | order_role | AccessShareLock 10060 | graciousstyle | order_role | AccessShareLock 9861 | graciousstyle | order_shipment_preference | AccessShareLock 9862 | graciousstyle | order_shipment_preference | AccessShareLock 9931 | graciousstyle | order_shipment_preference | AccessShareLock 9932 | graciousstyle | order_shipment_preference | AccessShareLock 10060 | graciousstyle | order_shipment_preference | AccessShareLock 9861 | graciousstyle | order_status | AccessShareLock 9862 | graciousstyle | order_status | AccessShareLock 9931 | graciousstyle | order_status | AccessShareLock 9932 | graciousstyle | order_status | AccessShareLock 10060 | graciousstyle | order_status | AccessShareLock 9862 | graciousstyle | order_status | RowExclusiveLock 9862 | graciousstyle | order_type | AccessShareLock 27874 | graciousstyle | order_type | AccessShareLock 9862 | graciousstyle | order_type | RowShareLock 27874 | graciousstyle | order_type | RowShareLock 9861 | graciousstyle | payment_method | AccessShareLock 9862 | graciousstyle | payment_method | AccessShareLock 9931 | graciousstyle | payment_method | AccessShareLock 9932 | graciousstyle | payment_method | AccessShareLock 10060 | graciousstyle | payment_method | AccessShareLock 9861 | graciousstyle | person | AccessShareLock 9862 | graciousstyle | person | AccessShareLock 9931 | graciousstyle | person | AccessShareLock 9932 | graciousstyle | person | AccessShareLock 10060 | graciousstyle | person | AccessShareLock 28124 | graciousstyle | pg_class | AccessShareLock 28124 | graciousstyle | pg_class_oid_index | AccessShareLock 28124 | graciousstyle | pg_locks | AccessShareLock 9861 | graciousstyle | pk_order_header | AccessShareLock 9931 | graciousstyle | pk_order_header | AccessShareLock 9932 | graciousstyle | pk_order_header | AccessShareLock 9935 | graciousstyle | pk_order_header | AccessShareLock 10060 | graciousstyle | pk_order_header | AccessShareLock 9861 | graciousstyle | postal_address | AccessShareLock 9862 | graciousstyle | postal_address | AccessShareLock 9931 | graciousstyle | postal_address | AccessShareLock 9932 | graciousstyle | postal_address | AccessShareLock 10060 | graciousstyle | postal_address | AccessShareLock 9862 | graciousstyle | product | AccessShareLock 9862 | graciousstyle | product | RowShareLock 9862 | graciousstyle | product_assoc | AccessShareLock 9862 | graciousstyle | product_feature_appl | AccessShareLock 9861 | graciousstyle | product_store_email_setting | AccessShareLock 9862 | graciousstyle | product_store_email_setting | AccessShareLock 9931 | graciousstyle | product_store_email_setting | AccessShareLock 9932 | graciousstyle | product_store_email_setting | AccessShareLock 10060 | graciousstyle | product_store_email_setting | AccessShareLock 9862 | graciousstyle | quantity_break | AccessShareLock 9862 | graciousstyle | security_group_permission | AccessShareLock 9862 | graciousstyle | shipment_cost_estimate | AccessShareLock 9861 | graciousstyle | shipment_method_type | AccessShareLock 9862 | graciousstyle | shipment_method_type | AccessShareLock 9931 | graciousstyle | shipment_method_type | AccessShareLock 9932 | graciousstyle | shipment_method_type | AccessShareLock 10060 | graciousstyle | shipment_method_type | AccessShareLock 9861 | graciousstyle | shipment_package_route_seg | AccessShareLock 9862 | graciousstyle | shipment_package_route_seg | AccessShareLock 9931 | graciousstyle | shipment_package_route_seg | AccessShareLock 9932 | graciousstyle | shipment_package_route_seg | AccessShareLock 10060 | graciousstyle | shipment_package_route_seg | AccessShareLock 9861 | graciousstyle | shipment_route_segment | AccessShareLock 9862 | graciousstyle | shipment_route_segment | AccessShareLock 9931 | graciousstyle | shipment_route_segment | AccessShareLock 9932 | graciousstyle | shipment_route_segment | AccessShareLock 10060 | graciousstyle | shipment_route_segment | AccessShareLock 9862 | graciousstyle | simple_sales_tax_lookup | AccessShareLock 9862 | graciousstyle | status_item | AccessShareLock 9931 | graciousstyle | status_item | AccessShareLock 9932 | graciousstyle | status_item | AccessShareLock 9862 | graciousstyle | status_item | RowShareLock 9862 | graciousstyle | status_valid_change | AccessShareLock 9862 | graciousstyle | user_login | AccessShareLock 27874 | graciousstyle | user_login | AccessShareLock 9862 | graciousstyle | user_login_security_group | AccessShareLock 9862 | graciousstyle | work_effort | AccessShareLock (169 rows) --------------090509050009050000000704--