Search Postgresql Archives

Re: Locking & concurrency - best practices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jan 14, 2008 2:43 PM, Adam Rich <adam.r@xxxxxxxxxxxxxxxxx> wrote:
>
> I have a "parent_tbl" and dozens of data tables, with foreign keys
> referencing the PK of "parent_tbl" (one-to-many).  There are 100+
> users accessing the application, usually (but not always) each user
> is working on a different record in parent_tbl.  (this would seem like
> a pretty standard scenario for a lot of apps)

You should be able to do "select for update" on both parent and child
records and get the effect you desire.

Think up your own worst case scenario for concurrent updates, then sit
down at two or more psql terminals, and try to simulate such a thing
and see what happens.  Experimentation is a great tool.

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
       message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux