Re: A few questions:

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: A few questions:
Date: 2003-03-31 15:48:52
Message-ID: 200303311548.h2VFmqI23834@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Christopher Kings-Lynne wrote:
> 1. Did that fix to not allow cluster on partial and non-null indexes get
> backpatched?

Yes, I see it in 7.3.X CVS.

> 2. How can I deliberately cause a deadlock in order to test some code?

Sure:

CREATE TABLE t1(x int);
CREATE TABLE t2(x int);
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);

CLIENT 1:
BEGIN;
UPDATE t1 SET x=2;

CLIENT 2:
BEGIN;
UPDATE t2 SET x=2;
UPDATE t1 SET x=1; -- blocks

CLIENT 1:
UPDATE t2 SET x=2;

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hiroshi Inoue 2003-03-31 16:08:52 Re: updateable cursors & visibility
Previous Message Robert Treat 2003-03-31 13:29:25 Re: What's a good PostgreSQL guide book?