foreign key causing unwanted record lock

From: "Donahue, Pat" <Pat(dot)Donahue(at)MSFC(dot)NASA(dot)GOV>
To: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: foreign key causing unwanted record lock
Date: 2002-04-05 20:51:31
Message-ID: 0D57AFA6D072F84884E90CE6565A367D23B7C1@ums.msfc.nasa.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> Table A Field 1 has a foreign key relationship with Table B Field 2. When
> I do an Insert into Table A, Postgres seems to be taking an exclusive lock
> on the record in Table B where Field 2 matches Field 1 in Table A (until
> the Insert is committed). This doesn't make sense to me. Can someone
> help me understand this? This lock is causing major throughput problems.
>
> Thanks,
>
> Pat
>
> Patrick T. Donahue
> (256) 544-5943 (office)
> (256) 721-0726 (home)
> 4607 Old Railroad Bed Road
> Harvest, AL 35749
>

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martín Marqués 2002-04-05 21:05:55 Re: binary data storage
Previous Message Eduardo_Cadena 2002-04-05 20:18:51 Storing & retieving gif/jpeg