FKs Lock Contention

From: "Bruno Almeida do Lago" <teolupus(at)gmail(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: FKs Lock Contention
Date: 2006-06-27 03:52:48
Message-ID: 44a0ab92.7d59c8c6.077d.ffffca49@mx.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

I need some help to understand better the way PostgreSQL works internally:

Oracle 8.1.7 used to have a severe lock contention when FKs had no index
(causing an sx table lock). AFAIK this was "fixed" on 9i with the addition
of "shared row locking".

Reading the docs I found that PostgreSQL team implemented "shared row
locking" on 8.1 (my personal thanks and admiration to those who did it), so
we now can expect much less contention.

With this new scenario, I wonder which FKs should really get an index and
which not (especially for composed FKs)? How the order of my PKs and FKs
would influence that?

I know this is not a simple question, but hope that someone could show me
the light. :-)

Best Regards,
Bruno Almeida do Lago

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-06-27 04:05:02 Re: auto-vacuum & Negative "anl" Values
Previous Message Alvaro Herrera 2006-06-27 03:49:00 Re: auto-vacuum & Negative "anl" Values