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

From Greg Stark
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
Msg-id 407d949e1002020808s4235a7d6p541029ead3cab629@mail.gmail.com
Whole thread Raw
In response to use pgsql in a big project, but i found pg has some big problem on concurrency write operation, maybe a joke for myself !  (wyx6fox@sina.com)
List pgsql-performance
2010/2/2  <wyx6fox@sina.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

pgsql-performance by date:

Previous
From: Andres Freund
Date:
Subject: Re: [HACKERS] Re: Faster CREATE DATABASE by delaying fsync (was 8.4.1 ubuntu karmic slow createdb)
Next
From: Robert Haas
Date:
Subject: Re: [HACKERS] Re: Faster CREATE DATABASE by delaying fsync (was 8.4.1 ubuntu karmic slow createdb)