Read Lock For Foreign Key

From: Jon Swinth <jswinth(at)atomicpc(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Read Lock For Foreign Key
Date: 2002-08-13 18:53:21
Message-ID: 200208131853.g7DIrLM02581@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

How come having foreign keys take out a read lock on a parent row rather than
a write lock is not on the todo list? I had someone tell me that this is
difficult because the SQL standard does not include syntax for read lock.
Does the fact that it will be difficult mean that it isn't needed?

I'm having trouble getting Postgre to scale when the db is properly
normalized and related and there are many clients. One of the main
contention points is with the product table. When a product first comes out,
there may be many many people that are interested. Because the FK triggers
take out a write lock, orders being placed referencing the same product must
wait in line to get a lock. Under high load, that wait can be substantial.

I wish I had the resources to help with Postgre development. For now, I can
only offer my observations.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jan Wieck 2002-08-13 19:14:47 Re: Read Lock For Foreign Key
Previous Message strange 2002-08-13 18:39:01 Re: [HACKERS] Linux Largefile Support In Postgresql RPMS