X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 3DE169DCD8B for ; Sat, 18 Mar 2006 02:38:36 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 33004-02 for ; Sat, 18 Mar 2006 02:38:35 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.207]) by postgresql.org (Postfix) with ESMTP id ED3639DCDCB for ; Sat, 18 Mar 2006 02:38:32 -0400 (AST) Received: by wproxy.gmail.com with SMTP id 71so6539wra for ; Fri, 17 Mar 2006 22:38:33 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:to:subject:date:user-agent:cc:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=badpARZ3lO+LYazxIU9+L40ehZfFy1T92pYXQ7sg0UByT/nO2dZfxq7S748m299qB8yNkrPaqKSF0GHcLGOb0MF9NHuIPVWcOCsAg+N6zYg+1wzvsgXg4pWopCVra8h3/1qHkpkGLV+SJebCCHoZc1AlBqmelQOAtKR3+/OKPKM= Received: by 10.54.140.6 with SMTP id n6mr2149643wrd; Fri, 17 Mar 2006 22:38:33 -0800 (PST) Received: from ?10.0.2.3? ( [200.62.104.37]) by mx.gmail.com with ESMTP id 26sm3137876wrl.2006.03.17.22.38.32; Fri, 17 Mar 2006 22:38:33 -0800 (PST) From: Kevin Brown To: Tom Lane Subject: Re: Transactions Date: Sat, 18 Mar 2006 00:45:44 -0600 User-Agent: KMail/1.8.3 Cc: pgsql-general@postgresql.org References: <200603180020.01418.blargity@gmail.com> <13508.1142662755@sss.pgh.pa.us> In-Reply-To: <13508.1142662755@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200603180045.44743.blargity@gmail.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.12 required=5 tests=[AWL=0.120] X-Spam-Score: 0.12 X-Spam-Level: X-Archive-Number: 200603/808 X-Sequence-Number: 92673 On Saturday 18 March 2006 00:19, Tom Lane wrote: > Kevin Brown writes: > > So when the dialog opens, it executes a BEGIN, and then based on whether > > they clicked ok or cancel on the dialog, it'd COMMIT or ROLLBACK. This > > worked fine for me in testing, but now that I have two people using this > > app simulatneously, if they both click on ok at the same time, postgres > > seemingly deadlocks. > > Shouldn't happen; please provide a reproducible test case. > > regards, tom lane When the "deadlock" occurs: kevin@ajbit:~> ps -elF | grep postgres 0 S postgres 17767 =C2=A0 =C2=A0 1 =C2=A00 =C2=A076 =C2=A0 0 - =C2=A09908 -= =C2=A0 =C2=A0 =C2=A0 4220 =C2=A0 0 Mar08 ? =C2=A0 =C2=A0 =C2=A0 =C2=A0 00:00:01 /usr/bin/postmaster -D /var/lib/pgsql/data 1 S postgres 17769 17767 =C2=A00 =C2=A076 =C2=A0 0 - =C2=A09973 - =C2=A0 = =C2=A0 =C2=A012544 =C2=A0 0 Mar08 ? =C2=A0 =C2=A0 =C2=A0 =C2=A0 00:00:09 postgres: writer process 1 S postgres 17770 17767 =C2=A00 =C2=A076 =C2=A0 0 - =C2=A07475 - =C2=A0 = =C2=A0 =C2=A0 2972 =C2=A0 0 Mar08 ? =C2=A0 =C2=A0 =C2=A0 =C2=A0 00:00:00 postgres: stats buffer process 1 S postgres 17771 17770 =C2=A00 =C2=A075 =C2=A0 0 - =C2=A07274 - =C2=A0 = =C2=A0 =C2=A0 3044 =C2=A0 0 Mar08 ? =C2=A0 =C2=A0 =C2=A0 =C2=A0 00:00:00 postgres: stats collector process 1 S postgres 29972 17767 =C2=A00 =C2=A076 =C2=A0 0 - 10312 - =C2=A0 =C2=A0 = =C2=A014016 =C2=A0 0 Mar16 ? =C2=A0 =C2=A0 =C2=A0 =C2=A0 00:00:04 postgres: dli dli 127.0.0.1(53492) idle 1 S postgres =C2=A04072 17767 =C2=A00 =C2=A076 =C2=A0 0 - 10261 - =C2=A0 = =C2=A0 =C2=A012892 =C2=A0 0 14:02 ? =C2=A0 =C2=A0 =C2=A0 =C2=A0 00:00:00 postgres: dli dli 127.0.0.1(42227) idle 1 S postgres =C2=A06020 17767 =C2=A00 =C2=A075 =C2=A0 0 - 10585 - =C2=A0 = =C2=A0 =C2=A015136 =C2=A0 0 19:57 ? =C2=A0 =C2=A0 =C2=A0 =C2=A0 00:00:29 postgres: dli dli 127.0.0.1(39869) idle in transaction 1 S postgres =C2=A06195 17767 =C2=A00 =C2=A076 =C2=A0 0 - 10323 semtim 1494= 0 =C2=A0 0 20:22 ? =C2=A0 =C2=A0 =C2=A0 =C2=A0 00:00:28 postgres: dli dli 127.0.0.1(37735) INSERT waiting 1 S postgres =C2=A06718 17767 =C2=A00 =C2=A076 =C2=A0 0 - 10240 - =C2=A0 = =C2=A0 =C2=A0 7504 =C2=A0 0 21:50 ? =C2=A0 =C2=A0 =C2=A0 =C2=A0 00:00:00 postgres: dli dli 127.0.0.1(56292) idle 1 S postgres =C2=A06721 17767 =C2=A00 =C2=A077 =C2=A0 0 - 10111 - =C2=A0 = =C2=A0 =C2=A0 5340 =C2=A0 0 21:51 ? =C2=A0 =C2=A0 =C2=A0 =C2=A0 00:00:00 postgres: dli dli 127.0.0.1(45934) idle 0 R kevin =C2=A0 =C2=A0 6835 =C2=A06816 =C2=A00 =C2=A078 =C2=A0 0 - =C2=A0 = 663 - =C2=A0 =C2=A0 =C2=A0 =C2=A0468 =C2=A0 0 22:00 pts/9 =C2=A0 =C2=A0 00:00:00 grep postgres You can see an insert is just waiting. On what? The server software never= =20 unlocks and it's just sitting in an execute for postgres. This only happens once a day, and only when 2 people are using it at once, = and=20 using this dialog at once, so I can't provide test cases. Let me know what= =20 else I can do to help troubleshoot.