Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id AD732633B09 for ; Wed, 3 Feb 2010 10:58:32 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 26217-04 for ; Wed, 3 Feb 2010 14:58:13 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-fx0-f225.google.com (mail-fx0-f225.google.com [209.85.220.225]) by mail.postgresql.org (Postfix) with ESMTP id D38B5633ADB for ; Wed, 3 Feb 2010 10:58:21 -0400 (AST) Received: by fxm25 with SMTP id 25so38193fxm.34 for ; Wed, 03 Feb 2010 06:58:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=M2RmMjlkHNN0wpUrlzwtKvaP0bFMGyp7g0zm6nOusaQ=; b=XzTMnDHOe79MhFuA+yPNQZZ72eexhoqyhBoYFRzdJ6Jv1YfhMb4TKe8ppeVjzdKnsM +cs/zfGU/yEiXmEXZeuGFlgWs50lcCUbzuwMZFhDxrF3PlZOlW8plDS3gm/jlhlDSWjv YHkwK8hX3meAMgjwJp5XqEUgeVUjXWoSnzbaM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=TDUUIjbFdOuB/ogPaddiv2Ih+LFw279ycZ6kTyqBylYSh+FM5/I9xA4lXDSIi8CCvx m1ND+cxaJeAOdp0zCcfrqbdgyoC6djZTwGCrsPSLjLCtbYnIbOqIm35AIabACdg7gz1o 7NmHcaXZJFcUwc1xuK3SWI8Kt816UxWnRlYqs= MIME-Version: 1.0 Received: by 10.239.193.11 with SMTP id g11mr1045788hbi.69.1265209099002; Wed, 03 Feb 2010 06:58:19 -0800 (PST) In-Reply-To: <20100203022830.2A375358C60@mail175-236.sinamail.sina.com.cn> References: <20100203022830.2A375358C60@mail175-236.sinamail.sina.com.cn> Date: Wed, 3 Feb 2010 09:58:18 -0500 Message-ID: <603c8f071002030658r54220906jda393a3cfe107912@mail.gmail.com> Subject: Re: some problems when i use postgresql 8.4.2 in my projects . From: Robert Haas To: wyx6fox@sina.com Cc: pgsql-performance@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.266 tagged_above=-10 required=5 tests=AWL=-1.081, BAYES_40=-0.185 X-Spam-Level: X-Archive-Number: 201002/56 X-Sequence-Number: 37477 2010/2/2 : > =A0the unique constraints actualy kill concurrency write transaction when > concurrency insert violate the unique constraints , they block each other= , > i test this in oracle10g, has the same behavour. I think this may be > reasonable because the uqniue check must be=A0 the seriazable check . > for resolve this problem , i do the unique check in application as possib= le > , but in big concurrency env , this is not good way . You may find that your way isn't actually very reliable, and that making it reliable will be very, very much harder (and likely no faster) than letting PostgreSQL do it. ...Robert