1. Did that fix to not allow cluster on partial and non-null indexes get
backpatched?

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

Chris


Mon, 31 Mar 2003 11:21:53 +0800
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au>
A few questions:
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@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073


Mon, 31 Mar 2003 10:48:52 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: A few questions: