Re: use pgsql in a big project, but i found pg has some big problem on concurrency write operation, maybe a joke for myself !

From: Greg Stark <gsstark(at)mit(dot)edu>
To: wyx6fox(at)sina(dot)com
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: use pgsql in a big project, but i found pg has some big problem on concurrency write operation, maybe a joke for myself !
Date: 2010-02-02 16:08:53
Message-ID: 407d949e1002020808s4235a7d6p541029ead3cab629@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

2010/2/2 <wyx6fox(at)sina(dot)com>:
> UPDATE webpages SET hits = hits + 1 WHERE url ='some url ';
>
>  when concurrency write transaction on read committed isolation , the hits
> may result wrong .

That should work fine. All updates for the same url will be serialized.

The rest I'm pretty uncertain about what you're describing but I think
you may want to check about whether you need indexes on the other side
of your foreign key constraints. If you're deleting records that are
referred to by your foreign keys or you're updating the primary key
then you'll want this index on the table with the foreign key
constraint as well as the mandatory one on the referenced table.

--
greg

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Scott Marlowe 2010-02-02 16:12:09 Re: the jokes for pg concurrency write performance
Previous Message Richard Broersma 2010-02-02 15:43:52 Re: 回复:Re: [PERFORM] the jokes for pg concurrency write performance